Skip to content

Update wins Google Apps Script to format wins json feed #4035

@roslynwythe

Description

@roslynwythe

Dependency

Overview

Currently the wins JSON feed contains no line breaks or spaces separating elements and so it is difficult to review Pull Requests for wins data updates. By formatting the JSON with each submission on a separate line and with use of spaces to indent, readability will be improved and JSON feeds could be compared more efficiently.

Action Items

  • Request VIEW access to the Wins Form Admin Guide Doc, the Wins-form (Response) Sheet, and gh-requests Doc from the dev lead
  • Read the Wins Form Admin Guide to understand the flow of wins data.
  • This issue will require modification of the code within the Wins-form (responses) sheet, but you will require a test environment that includes copies of Wins-form (Responses) and gh-requests. It will also be necessary to setup a test environment in your GitHub repository. Follow instructions in the comment in the Hfla Google Apps Script Development Guide1 and Testing WINS in a test repository2
  • Once you have made copies of the required documents, let the dev lead know that access can be ended.
  • In the Google Apps Script module Code.gs in the project WinsFormResponse, which is bound to Wins-form (Responses) Sheet, update main() to format the _wins-data.json feed, either using options built into the JSON.stringify method, or a different method. Required features are:
    • Line Breaks separating array items (where each array item represents the data for a contributor)
    • Line Break with spaces indenting properties within each array item
  • Test the code by running main() in debug mode. A new pull request "Update wins-data.json via Google Apps Script" should be appear in your test repository. Examine the json data and if it looks good, merge into your repository test branch and examine the resulting Wins page.
  • Add/commit Code.js and create a pull request as usual
  • In the pull request, provide links to the "Update wins-data.json via Google Apps Script" Pull Request and also the Wins page (both in your repository), for the convenience of reviewers.
  • Contact a dev lead to discuss review/demonstration

Dev Lead

  • Remove VIEW access to all protected documents

Resources/Instructions

Footnotes

  1. Hfla Google Apps Script Development Guide - draft

  2. Testing WINS in a test repository

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions