Enhance wins sheets to support selection for homepage randomizer
- Dominant language
- JavaScript
- Stars
- 363
- Forks
- 872
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 18
Description
### Dependency
- [x] #2901
- [x] #4134
- [x] #3641
### Overview
We need enhancements to Wins-form (Responses) to help PMs in identifying which wins entries should be displayed in the website homepage randomizer.
### Action Items
- [ ] Follow sections 1-3 in the Wins Apps Script Development Process[^4]. Note that in this issue you will only be modifying the Apps Script `wins-form-responses` so all commands should be run from `/google-apps-script/wins-form-responses`
- [ ] As described in section 3a and 3b, you will provide a dev lead with the google account you wish to use for testing, and request the dev lead to:
- [ ] share the Wins Form Admin Guide[^1] as VIEWER
- [ ] share the Wins-form (Response)[^2] sheet as VIEWER
- [ ] share the Wins-form[^3]
- [ ] Note to lead: make a copy of `Wins-form`, including the issue # in the name, then share that copy with the developer as EDITOR.
- [ ] Continue following instructions in 3c and d. As described in 3d, you will have to make modifications to certain documents in the test folder.
- [ ] Update settings in Wins-form so that responses are stored in your test version of Wins-form (Response)
- [ ] In Wins-form (Response), add trigger so that `insertLatestFormSubmitIntoReviewSheet` runs when the test form is submitted.
- [ ] Continue following instructions through section 6 "Editing". As described in this section, editing can be done locally in an IDE or in the Google Drive cloud editor, and the `clasp` utility can be used to transfer code back and forth between the local worksation and the Google Drive as needed.
- [ ] Copy columns H through R from the "Homepage Summary" sheet to the "Review" sheet.
- [ ] Create a new sheet "Log". Label the fist column "Wins ID" and copy columns F through H from the "Homepage Summary" sheet to the "Log" sheet, to the right of the "Wins ID" column
- [ ] Setup a formula so that column "# of times appeared on website" on the Review sheet, is sourced from the "Log" sheet, based on matching the "Wins ID" columns on the "Review" and "Log" sheets.
- [ ] On the Review sheet, add a new column "Person ID" to the right of "Wins ID"
- [ ] Create a new tab/sheet "Persons" with columns "Person ID", "email", "# of wins IDs"
- [ ] Add code so that when a new wins submission is processed, a "Person ID" is assigned, and the "# of wins IDs" is populated, based on the assumption that each unique email address represents a unique "person".
- [ ] Test the code to confirm that both for new form submissions and for Review sheet updates, both the Review, Log, and Persons sheets are updated appropriately.
- [ ] You will not have to run `main()` for this issue, so if there are errors related to not having access to gh-requests, you can remove the gh-requests library and if necessary "comment out" main()
- [ ] Follow all steps through section 8 "Completing an issue". For this issue, only a single file `google-apps-script/wins-form-responses/Code.js` should be committed. Contact the dev lead via Slack to arrange the review.
### Merge Team/dev Lead
- [ ] ensure that all access to Wins Form Admin Guide[^1], the Wins-form (Response) Sheet[^2], and the Wins-form[^3] have been revoked.
### Resources/Instructions
- [Google Apps Script](https://developers.google.com/apps-script/overview)
- [_wins-data file](https://github.com/hackforla/website/blob/gh-pages/_data/external/_wins-data.json)
- [wins page JS](https://github.com/hackforla/website/blob/gh-pages/assets/js/wins.js)
[^1]:[Wins Form Admin Guide](https://docs.google.com/document/d/1j1JTX5XzotgVCVZ91ImvenedPN5-IVjdSKDukq1B9iE/edit?usp=drive_link)
[^2]:[Wins-form (Response) Sheet](https://docs.google.com/spreadsheets/d/1fXmYrmNtrgdzkM_odGIRbSwdaea3yS0cTLCJUzZ6Sc0/edit?usp=drive_link)
[^3]:[Wins-form](https://docs.google.com/forms/d/1wojt_jriqXe4388wpIqC-b3dzX2he-y1oa4lbbLCRvI/edit)
[^4]:[Wins Apps Script Development Process](https://github.com/hackforla/website/issues/4134#issuecomment-1741851926)
Contributor guide
Assessment
This issue has not been assessed yet.