website icon indicating copy to clipboard operation
website copied to clipboard

Wins page: Fix question marks appearing where apostrophes are expected

Open JessicaLucindaCheng opened this issue 3 years ago • 9 comments

Overview

As developers, we want to make sure the website displays information correctly so that the information is accurate and our website looks professional. For this issue, we will figure out what is causing the apostrophes to change to question marks in the Google Apps Script and fix the problem.

Screenshot of problem: Question marks where apostrophes are expected wins-page-question-marks

Details

The original submission by Janie Chen did not contain question marks in the Wins-form (Responses) Google Sheet. However, the question marks appear on the Wins page. The problem may come from the Google Apps Script that generates the _data/external/_wins-data.json and _data/external/wins-data.json because the question marks are seen in the json files.

Action Items

  • [ ] Request access to the "HfLA website Admin" Google Drive by asking one of the technical lead(s)/merge team member(s)
  • [ ] Make copies of files in the "HfLA website Admin" Google Drive in your own drive (for making code changes to Apps Script and for testing)
  • [ ] Figure out what is causing the apostrophes to change to question marks in the Google Apps Script
  • [ ] Fix the problem in your own copies of the Apps Script and in your own drive
  • [ ] Check and test the changes in your own drive
  • [ ] Before the changes are to be added to the production script, demo the code changes in your drive to the dev team leads
  • [ ] Edit the production script with your code changes
  • [ ] Check and test production script code changes work fine
  • [ ] Reach out to the dev team leads and ask them to review the changes to the production script code

Resources/Instructions

JessicaLucindaCheng avatar Jan 08 '22 20:01 JessicaLucindaCheng

Hi @JessicaLucindaCheng.

Please don't forget to add the proper labels to this issue. Currently, the labels for the following are missing: Size, Role

To add a label, take a look at Github's documentation here.

Also, don't forget to remove the "missing labels" afterwards. To remove a label, the process is similar to adding a label, but you select a currently added label to remove it.

After the proper labels are added, the merge team will review the issue and add a "Ready for Milestone" label once it is ready for prioritization.

Additional Resources:

github-actions[bot] avatar Jan 08 '22 20:01 github-actions[bot]

@SAUMILDHANKAR @R-Tomas-Gonzalez

  1. Did you want it so that any backend developer can take this issue and would need to just ask a technical lead for access to the wins submission Google Sheet?

  2. I don't have access to the wins Google Sheet and don't know what the link for it is. Can one of you add it to the Resources section?

JessicaLucindaCheng avatar Jan 09 '22 11:01 JessicaLucindaCheng

@SAUMILDHANKAR @R-Tomas-Gonzalez

  1. Did you want it so that any backend developer can take this issue and would need to just ask a technical lead for access to the wins submission Google Sheet?

  2. I don't have access to the wins Google Sheet and don't know what the link for it is. Can one of you add it to the Resources section?

  1. Tomas said just tech lead is fine
  2. I'm just going to leave out the resource because I don't have access to it nor a link for it.

JessicaLucindaCheng avatar Jan 11 '22 20:01 JessicaLucindaCheng

@SAUMILDHANKAR Since the files needed to fix this issue are in the protected admin drive, should I restrict this issue to admins/leads that have access to the drive to work on? Or can it be open to other developers and they would just have to ask a lead for access (similar to how Matt wrote issue #2385)?

JessicaLucindaCheng avatar Feb 05 '22 21:02 JessicaLucindaCheng

@JessicaLucindaCheng It can be open to other developers as well. (like Matt's issue). Thanks for bringing it up.

SAUMILDHANKAR avatar Feb 06 '22 10:02 SAUMILDHANKAR

@SAUMILDHANKAR Since you are more familiar with Google AppScripts than I am. Could you review this issue for ready for milestone? If it's not ready, please provide feedback as to what I need to change. Thank you.

JessicaLucindaCheng avatar Mar 11 '22 22:03 JessicaLucindaCheng

@SAUMILDHANKAR Since you are more familiar with Google AppScripts than I am. Could you review this issue for ready for milestone? If it's not ready, please provide feedback as to what I need to change. Thank you.

@JessicaLucindaCheng Thanks for writing the issue. My suggestions:

  • We could go for a shorter title like "Fix question mark error on Wins page" or something similar. I remember from our team meetings to make titles succinct.
  • I would also suggest adding the following points as reminders in the action items (this might help avoiding accidental changes to the production script)
    • make copies of files in the admin drive in their own drive (for making code changes to apps script and testing)
    • demo of changes and recommendations to team leads recommended before the changes could be added to production script.

SAUMILDHANKAR avatar Mar 27 '22 06:03 SAUMILDHANKAR

@SAUMILDHANKAR I really appreciate you taking the time to give me feedback on writing this issue. I made the requested changes, except I left the title more descriptive because I felt being descriptive and clear was more important than being super succinct. (Though I did shorten the title a bit.)

Please put a ready for milestone label on if you think it's ready. Otherwise, let me know what else should be changed.

JessicaLucindaCheng avatar Apr 07 '22 01:04 JessicaLucindaCheng

Hi @usaboo, 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 :)

github-actions[bot] avatar Jul 22 '22 04:07 github-actions[bot]

Hi @ldaws003, 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 :)

github-actions[bot] avatar Nov 13 '22 04:11 github-actions[bot]

Availability: Sunday 12:00pm - 5pm, Monday 3:00pm to 6:00pm, Tuesday 9:00am-5:00pm, and Wednesday 4:00pm-8:00pm ETA: Wednesday 5:00pm

ldaws003 avatar Nov 13 '22 04:11 ldaws003

Progress: Downloaded the files from the drive and will be going through Google App Script docs before trying to find the bug Blockers: N/A Availability: Monday 4:00pm to 7:00pm, Wednesday 2:00pm to 5:00pm, Friday: 5:00pm to 8:00pm ETA: Saturday

ldaws003 avatar Nov 20 '22 07:11 ldaws003

Progress: Read through documentation, will be searching for the bug solution Blockers: N/A Availability: Friday 8:00am-5:00pm, Saturday (all day), Sunday (all day) ETA: Sunday

ldaws003 avatar Nov 27 '22 18:11 ldaws003

Progress: Searching for the bug Blockers: N/A Availability: Thursday (all day), Friday 8:00am-5:00pm, Saturday (all day), Sunday (all day) ETA: Sunday

ldaws003 avatar Dec 04 '22 21:12 ldaws003

Progress: Searching for bug Blockers: N/A Availability: Saturday (all day), Sunday (all day) ETA: Sunday

ldaws003 avatar Dec 12 '22 02:12 ldaws003

@ldaws003

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 (optional): "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 19, 2022 at 11:16 PM PST.

github-actions[bot] avatar Dec 23 '22 07:12 github-actions[bot]

Progress: Still trying to find the bug
Blockers: Can't find documentation on GHRequest and getting errors trying to run app script
Availability: Saturday (all day), Sunday (all day)
ETA: Sunday 10:00pm

ldaws003 avatar Dec 23 '22 10:12 ldaws003

Progress: Fixed Bug waiting to demo for dev team leads Blockers: None Availability: Saturday (all day), Sunday (all day) ETA: Sunday 10:00pm

ldaws003 avatar Jan 02 '23 20:01 ldaws003

Progress: Fixed Bug waiting to demo for dev team leads Blockers: None Availability: Monday - Friday 1:00pm to 5:00pm ETA: Thursday 10:00pm

ldaws003 avatar Jan 08 '23 13:01 ldaws003

Developer demonstrated his code and showed that the wins-data.json file replaced the question marks with apostrophes. We double checked with diffchecker.com to make sure there were no unintended removals or additions. The production code was updated but cannot run due to a "bad credentials" message as shown in the log below: image

I expect this may be due to the github authorization token expiration which we should try to fix so we can review the Wins page on the published website and see if it is working. Then we can close this issue without PR.

jdingeman avatar Jan 11 '23 23:01 jdingeman

@ldaws003

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 (optional): "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, January 16, 2023 at 11:16 PM PST.

github-actions[bot] avatar Jan 20 '23 07:01 github-actions[bot]

Progress: Displayed solution, code was successful but there was an unexpected error not on my part, waiting for response. Blockers: None Availability: Just waiting ETA: N/A

ldaws003 avatar Jan 21 '23 07:01 ldaws003

Tried to run the code after the authorization token was updated. I am not entirely sure how the workflow works for the Google Apps Script issues, because it seems that after running this code, it pushed a commit directly into PR #3024, and from the looks of it, it has indeed fixed the issue of question marks showing up where the apostrophes are supposed to be. Since the most recent commit displays the expected outcome, @ldaws003 I think you should be safe to go onto your next issue if you'd like! Nice job! I'll talk with @hackforla/website-merge regarding PR #3024 to see what we need to do about pushing the code into the codebase. It may have a few dependencies that need to be satisfied before we can merge it.

We'll leave this issue open until we determine the next step.

jdingeman avatar Jan 21 '23 08:01 jdingeman

OK. For the fix the only line of code that I had to change was line 93. I changed it from this

const encodedArrayData = Utilities.base64Encode(${cleanedAndFormattedArrayData});

to this

const encodedArrayData = Utilities.base64Encode(cleanedAndFormattedArrayData, Utilities.Charset.UTF_8);

The encoding of the data was the problem. The second parameter tells the function what the encoding of the input is, and it seems that the google sheets data is in UTF-8. The google documentation doesn't state what charset is used when you don't use the second parameter.

ldaws003 avatar Jan 25 '23 22:01 ldaws003

@ldaws003

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 (optional): "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, January 30, 2023 at 11:17 PM PST.

github-actions[bot] avatar Feb 03 '23 07:02 github-actions[bot]

@ldaws003

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 (optional): "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, February 6, 2023 at 11:17 PM PST.

github-actions[bot] avatar Feb 10 '23 07:02 github-actions[bot]

Issue has been corrected. Closing this issue.

jdingeman avatar Feb 11 '23 22:02 jdingeman

Hi @ldaws003, 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 :)

github-actions[bot] avatar Apr 23 '23 17:04 github-actions[bot]