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

Google Apps Script: Fix extra empty JSON field problem #3417

Closed
2 of 4 tasks
luke-karis opened this issue Jul 22, 2022 · 10 comments
Closed
2 of 4 tasks

Google Apps Script: Fix extra empty JSON field problem #3417

luke-karis opened this issue Jul 22, 2022 · 10 comments
Assignees
Labels
automation for manulal github board maintenance actions that are going to be automated Complexity: Medium Feature: Google Apps Scripts Automation related to Google Apps Scripts role: back end/devOps Tasks for back-end developers size: missing Status: Updated No blockers and update is ready for review time sensitive Needs to be worked on by a particular timeframe

Comments

@luke-karis
Copy link
Member

luke-karis commented Jul 22, 2022

Overview

In the _wins-data.json and wins-data.json at the end of each Wins entry, there is "":"", which wasn't there in the current _wins-data.json and current wins-data.json in gh-pages. The objective of this ticket is to figure out why this is happening and implement a fix.

Action Items

  • Obtain access to the Google Apps Script in the admin drive from the technical lead
  • Become familiar with the workflow process of writing to the _wins-data.json and wins-data.json files
  • Determine the cause of the bug detailed in this ticket
  • Fix the bug so that there is no longer "":"" added to the end of each entry in the _wins-data.json and wins-data.json files

Resources/Instructions

The PR where the updated wins data goes to is here #3024. You can see the issue described by this ticket by going to the files changed tab in this PR and scrolling through one of the wins-data files until you reach the end of an entry.

@github-actions github-actions bot added Feature Missing This label means that the issue needs to be linked to a precise feature label. role missing size: missing labels Jul 22, 2022
@github-actions

This comment was marked as outdated.

@luke-karis luke-karis added role: back end/devOps Tasks for back-end developers Complexity: Medium time sensitive Needs to be worked on by a particular timeframe automation for manulal github board maintenance actions that are going to be automated Feature: Google Apps Scripts Automation related to Google Apps Scripts and removed Feature Missing This label means that the issue needs to be linked to a precise feature label. role missing size: missing labels Jul 22, 2022
@ExperimentsInHonesty ExperimentsInHonesty added the ready for dev lead Issues that tech leads or merge team members need to follow up on label Sep 12, 2022
@kathrynsilvaconway kathrynsilvaconway added Ready for Prioritization and removed ready for dev lead Issues that tech leads or merge team members need to follow up on labels Sep 13, 2022
@aricforrest aricforrest self-assigned this Oct 17, 2022
@github-actions
Copy link

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

@aricforrest
Copy link
Member

Availability: Monday-Wednesday 5 PM - 7 PM PST
ETA: 10/19/2022

@aricforrest
Copy link
Member

Blocker - Unable to replicate the bug of empty key value pairs in JSON in my own Google Apps Scripts instance using a copy of Wins-form (Responses) sheet.

@luke-karis created this issue on July 21, 2022 and completed updating another Wins process issue #2901 on September 17, 2022 so I'm wondering if this bug has already been resolved. Data in any columns after O in the spreadsheet would cause similar behavior as described by this bug. However, the bot's most recent PR (#3024) to update the Wins JSON files still show the empty key-value pairs.

Google Apps Scripts aren't being stored in GitHub to check to see what changes were made for issue #2901 so I've created issue #3641 to begin storing/tracking Google Apps Scripts also in GitHub.

Should I copy the current Wins-form (Responses) Google Sheet into a new file in the same HfLA website Admin/Wins to review folder and attempt debugging/testing the main function there?

  • The main function calls the ghrequests library to update the Wins files in the bot's update-wins-data branch and initiates a PR against the project's primary gh-pages branch.

@github-actions github-actions bot added the Status: Updated No blockers and update is ready for review label Oct 21, 2022
@aricforrest
Copy link
Member

Google's Advanced Protection enabled on an account prevents running Apps Scripts from unverified/unapproved apps. A work around is to add the following block at the top of the script, but due to the Wins-form (Responses) using the ghrequests library from another Google Doc, this is not an option.

/**
 * @OnlyCurrentDoc
 */

I am creating a new Google account without Advanced Protection enabled and sharing the Google Share with it to continue working on this issue.

@aricforrest
Copy link
Member

The API token for the elizabethhonest GitHub account is not valid. The admin guide states this needs to be updated every month and it looks like it was last updated 1/30/2022.

@aricforrest
Copy link
Member

@aricforrest
Copy link
Member

Issue is ready for review @hackforla/website-merge

@ExperimentsInHonesty
Copy link
Member

@hackforla/website-merge I am not sure if this is fixed or it was determined that its not a problem or it couldn't be determined that its not a problem because of the token issue #3748

@jdingeman
Copy link
Member

Closing issue since issue seems to have been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation for manulal github board maintenance actions that are going to be automated Complexity: Medium Feature: Google Apps Scripts Automation related to Google Apps Scripts role: back end/devOps Tasks for back-end developers size: missing Status: Updated No blockers and update is ready for review time sensitive Needs to be worked on by a particular timeframe
Projects
Development

No branches or pull requests

5 participants