Code-for-America-Projects-Hub icon indicating copy to clipboard operation
Code-for-America-Projects-Hub copied to clipboard

Ideas Spreadsheet has no primary key

Open alfredortega opened this issue 9 years ago • 8 comments

Without a primary key it is difficult to ensure that moving between pages (Parent/Child) will return the proper results.

HACK FIX: Each record does have a date stamp with I will convert to long which should produce a consistent key. Unfortunately this is only in memory on the client so it doesn't help performance or making finding the record easier.

-Al

alfredortega avatar Apr 14 '15 19:04 alfredortega

Would hashing the GitHub URL be a better key like one of the suggestions proposed in Generate a Hash from string in Javascript/jQuery

zmon avatar May 03 '15 04:05 zmon

I don't believe so because not every idea will have a github url. I have added an JSON element which has the timestamp converted to a float.

alfredortega avatar May 03 '15 14:05 alfredortega

Ideas don't have Github URLs, do they? On May 2, 2015 11:02 PM, "Paul D Barham" [email protected] wrote:

Would hashing the GitHub URL be a better key like one of the suggestions proposed in Generate a Hash from string in Javascript/jQuery http://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript-jquery

Reply to this email directly or view it on GitHub https://github.com/codeforkansascity/Code-for-America-Projects-Hub/issues/69#issuecomment-98435400 .

jstirnaman avatar May 03 '15 21:05 jstirnaman

Ideas do not have github URLs. So yes for them the Date/Time stamp would be best.

On Sun, May 3, 2015 at 4:13 PM, Jason Stirnaman [email protected] wrote:

Ideas don't have Github URLs, do they? On May 2, 2015 11:02 PM, "Paul D Barham" [email protected] wrote:

Would hashing the GitHub URL be a better key like one of the suggestions proposed in Generate a Hash from string in Javascript/jQuery < http://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript-jquery

Reply to this email directly or view it on GitHub < https://github.com/codeforkansascity/Code-for-America-Projects-Hub/issues/69#issuecomment-98435400

.

— Reply to this email directly or view it on GitHub https://github.com/codeforkansascity/Code-for-America-Projects-Hub/issues/69#issuecomment-98544917 .

Paul Barham 816-679-8010

zmon avatar May 03 '15 21:05 zmon

Might i suggest instead of datetime maybe using epoch time it's more finite. Also Do we store these ideas anywhere for example a database?

darphicus avatar Oct 21 '15 01:10 darphicus

Ideas are stored in Google spreadsheet: https://docs.google.com/spreadsheets/d/1PGM2P9o0bkJ_xCkoH2ps_Dp5xnBDrPxmIB-jnJWAwhE/edit#gid=2130878799

tangospring avatar Oct 21 '15 02:10 tangospring

Thank you!

darphicus avatar Oct 21 '15 14:10 darphicus

So my suggestion would be make one column on the SpreadhSheet a sequencer.

That can be an epoch timestamp or other sequence such as (1,2,3,4,......n). That would give you the organizational ordinal so that you can do sorting. so when the app writes out to the spreadsheet it could do this as one of the columns. It would take a little rework to get the historical data but not that much.

darphicus avatar Oct 22 '15 15:10 darphicus