Code-for-America-Projects-Hub
Code-for-America-Projects-Hub copied to clipboard
Ideas Spreadsheet has no primary key
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
Would hashing the GitHub URL be a better key like one of the suggestions proposed in Generate a Hash from string in Javascript/jQuery
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.
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 .
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
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?
Ideas are stored in Google spreadsheet: https://docs.google.com/spreadsheets/d/1PGM2P9o0bkJ_xCkoH2ps_Dp5xnBDrPxmIB-jnJWAwhE/edit#gid=2130878799
Thank you!
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.