hackforla / website

Hack for LA's website
https://www.hackforla.org
GNU General Public License v2.0
300 stars 750 forks source link

Google Apps Script: Add unique IDs as object keys for each wins entry #2385

Open macho-catt opened 2 years ago

macho-catt commented 2 years ago

Dependency

Overview

To expedite the process of locating a specific wins entry, each wins entry (which is also a javascript object) should have a unique ID as a key.

Action Items

Resources/Instructions

Google Apps Script _wins-data file wins page JS [^1]:Wins Apps Script Development Guide - see draft

github-actions[bot] commented 2 years ago

Hi @macho-catt.

Good job adding the required labels to this issue.

Additional Resources: Wiki: How to add status labels to issues (WIP. Link will be updated when the wiki is done) Wiki: How to create issues (WIP. Link will be updated when the wiki is done)

lopezpedres commented 2 years ago

Availability for this week: 10 hrs. My estimated ETA for completing this issue: 2021/12/28

github-actions[bot] commented 2 years ago

@lopezpedres

Please add update using the below template (even if you have a pull request). Afterwards, remove the 'To Update !' label and add the 'Status: Updated' label.

  1. Progress: "What is the current status of your project? What have you completed and what is left to do?"
  2. Blockers: "Difficulties or errors encountered."
  3. Availability: "How much time will you have this week to work on this issue?"
  4. ETA: "When do you expect this issue to be completed?"
  5. Pictures: "Add any pictures of the visual changes made to the site so far."

If you need help, be sure to either: 1) place your issue in the developer meeting discussion column and ask for help at your next meeting, 2) put a "Status: Help Wanted" label on your issue and pull request, or 3) put up a request for assistance on the #hfla-site channel.

You are receiving this comment because your last comment was before Monday, December 20, 2021 at 11:19 PM PST.

lopezpedres commented 2 years ago

Progress:

Done

image

Doing

Blockers: No blockers Availability: 10 hrs ETA: December 30th

ExperimentsInHonesty commented 2 years ago

open a new issue, and self assign to Please add the instruction on when and how to encode a token to the contributing.md file

SAUMILDHANKAR commented 2 years ago

@lopezpedres Thanks for making a PR. Please add the final code changes that you have made here. Also, the mobile and desktop screenshots of the wins page that you see in your local env after merging PR as well as the unique ID that is generated in wins-data.json file. It will be helpful to get all this documented with this issue. I will add the changes to the main gs code app script and close the PR after your demo on Sunday. Thank you.

lopezpedres commented 2 years ago

@SAUMILDHANKAR Thank you! I'll attach the two screenshots here:

Mobile Screenshot ![screencapture-localhost-4000-wins-2022-01-04-16_12_57](https://user-images.githubusercontent.com/63615112/148141464-bfaf8d91-7bc4-4032-8834-7356c921ff40.png)
Desktop Screenshot ![screencapture-localhost-4000-wins-2022-01-04-16_24_39](https://user-images.githubusercontent.com/63615112/148141683-4ef90b07-573c-4501-bdab-c196c3825bff.png)
Example of an UniqueID generated The key for all the objects is "UniqueID" and its value is the Timestamp when the form was submitted as well as the email of the creator of the submit. Example: ``` json { "UniqueID" : "2020-11-30T06:17:25.226Z : johnsritchey@yahoo.com"} ```
SAUMILDHANKAR commented 2 years ago
// Create an array of objects (key-value pair) based on the column headers and rows of values so the data does not need to be formatted later in GitHub
  const keyValueData = filteredRows.map(row => {
    const valueObject = new Object();
    row.forEach((value, i) => {
      valueObject[columnHeaders[i]] = value;
    })
    const date = valueObject["Timestamp"]
    const formatDate = Utilities.formatDate(date, 'Etc/GMT', 'yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\'')
    valueObject["UniqueID"]=`${formatDate} : ${valueObject["Email Address"]}`
    return valueObject;
  })

lines 7, 8, 9 to be added in the main code.

SAUMILDHANKAR commented 2 years ago

So, last few action items are still pending and therefore, adding dependency and moving this to ice box. Again, thank you Miguel for all your hard work on this. Great work!

ExperimentsInHonesty commented 1 year ago

I moved this issue from the icebox to the new issue approval column because the dependency has been satisfied.

jdingeman commented 1 year ago

@ExperimentsInHonesty, this issue's dependency is also back in the new issue approval column due to your comment on #2901.

If we want to reopen #2901, do you want this issue to be put back into the icebox until the dependency is fully satisfied?

jdingeman commented 1 year ago

Sending this issue back to the Ice Box as its dependency #2901 has been determined to be not satisfied after its merge.

roslynwythe commented 1 year ago

The dependency https://github.com/hackforla/website/issues/2901 has been satisfied, however two new issues should be considered as dependencies: #3722 and #3641

github-actions[bot] commented 1 year ago

Hi @roslynwythe, thank you for taking up this issue! Hfla appreciates you :)

Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)

You're awesome!

P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)

roslynwythe commented 1 year ago

Added dependencies: https://github.com/hackforla/website/issues/3722 and https://github.com/hackforla/website/issues/3641, as it would be desirable to defer updates to Google Apps Script code until that code is source controlled. Moving the issue to the Ice Box.

ExperimentsInHonesty commented 7 months ago

@roslynwythe I moved this into the new issue review column because the dependency is resolved. Please add a ready for prioritization label if its ready.