Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wins page: Fix question marks appearing where apostrophes are expected #2675

Closed
9 tasks done
JessicaLucindaCheng opened this issue Jan 8, 2022 · 28 comments
Closed
9 tasks done
Assignees
Labels
2 weeks inactive An issue that has not been updated by an assignee for two weeks Bug Something isn't working Complexity: Large P-Feature: Wins Page https://www.hackforla.org/wins/ role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours
Milestone

Comments

@JessicaLucindaCheng
Copy link
Member

JessicaLucindaCheng commented Jan 8, 2022

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

@github-actions

This comment has been minimized.

@JessicaLucindaCheng JessicaLucindaCheng added size: 1pt Can be done in 4-6 hours Complexity: Medium role: hfla leadership Any issue that the blocker is a resource controlled by HfLA leadership and removed size: missing role missing labels Jan 8, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title DRAFT: Janie Chen's wins entry contains question marks where there should be apostrophes Janie Chen's wins entry contains question marks where there should be apostrophes Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng added the role: back end/devOps Tasks for back-end developers label Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title Janie Chen's wins entry contains question marks where there should be apostrophes Investigate why Janie Chen's wins entry contains question marks where there should be apostrophes and decide next steps Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title Investigate why Janie Chen's wins entry contains question marks where there should be apostrophes and decide next steps Investigate if Janie Chen's original wins submission contained question marks where there should be apostrophes and decide next steps Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title Investigate if Janie Chen's original wins submission contained question marks where there should be apostrophes and decide next steps DRAFT: Investigate if Janie Chen's original wins submission contained question marks where there should be apostrophes and decide next steps Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title DRAFT: Investigate if Janie Chen's original wins submission contained question marks where there should be apostrophes and decide next steps DRAFT: Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng removed the role: hfla leadership Any issue that the blocker is a resource controlled by HfLA leadership label Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title DRAFT: Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected DRAFT: Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Jan 9, 2022
@JessicaLucindaCheng

This comment has been minimized.

@JessicaLucindaCheng JessicaLucindaCheng changed the title DRAFT: Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng added the role: hfla leadership Any issue that the blocker is a resource controlled by HfLA leadership label Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected DRAFT-Jessica:Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title DRAFT-Jessica:Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected DRAFT-Jessica is writing this:Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Jan 9, 2022
@JessicaLucindaCheng JessicaLucindaCheng changed the title DRAFT-Jessica is writing this:Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Investigate if Janie Chen's original wins submission contained question marks where apostrophes are expected Jan 10, 2022
@JessicaLucindaCheng

This comment has been minimized.

@JessicaLucindaCheng JessicaLucindaCheng added role: back end/devOps Tasks for back-end developers Complexity: Small Take this type of issues after the successful merge of your second good first issue and removed role: back end/devOps Tasks for back-end developers Complexity: Medium labels Jan 22, 2022
@github-actions
Copy link

@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.

@ldaws003
Copy link
Member

ldaws003 commented Dec 23, 2022

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 ldaws003 added Status: Updated No blockers and update is ready for review and removed 2 weeks inactive An issue that has not been updated by an assignee for two weeks labels Dec 23, 2022
@ldaws003
Copy link
Member

ldaws003 commented Jan 2, 2023

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

@ldaws003
Copy link
Member

ldaws003 commented Jan 8, 2023

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

@jdingeman
Copy link
Member

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.

@github-actions github-actions bot removed the Status: Updated No blockers and update is ready for review label Jan 20, 2023
@github-actions
Copy link

@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 github-actions bot added the 2 weeks inactive An issue that has not been updated by an assignee for two weeks label Jan 20, 2023
@ldaws003
Copy link
Member

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

@jdingeman
Copy link
Member

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.

@ldaws003
Copy link
Member

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 ldaws003 removed the 2 weeks inactive An issue that has not been updated by an assignee for two weeks label Jan 25, 2023
@github-actions github-actions bot added the Status: Updated No blockers and update is ready for review label Jan 27, 2023
@github-actions github-actions bot added 2 weeks inactive An issue that has not been updated by an assignee for two weeks and removed Status: Updated No blockers and update is ready for review labels Feb 3, 2023
@github-actions
Copy link

github-actions bot commented Feb 3, 2023

@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.

@MattPereira MattPereira removed the 2 weeks inactive An issue that has not been updated by an assignee for two weeks label Feb 3, 2023
@github-actions github-actions bot added the 2 weeks inactive An issue that has not been updated by an assignee for two weeks label Feb 10, 2023
@github-actions

This comment was marked as outdated.

@jdingeman
Copy link
Member

Issue has been corrected. Closing this issue.

@github-actions
Copy link

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 weeks inactive An issue that has not been updated by an assignee for two weeks Bug Something isn't working Complexity: Large P-Feature: Wins Page https://www.hackforla.org/wins/ role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours
Projects
Development

No branches or pull requests

7 participants