This project consists of a set of JavaScript Google Sheets scripts designed to streamline the handling of data for our 2024 tournament (and hopefully future ones). These scripts process and integrate data from multiple sources, helping managing participant information.
I've implemented asynchronous processing in some parts of the script, such as creating each spreadsheet one by one, where I felt it was needed. However, there is definitely room for improvement in terms of performance optimization.
The scripts populate and manage several sheets within a main Google Sheets document. View the Google Sheet here. Which is under the Tourney Organization Folder
Here I will explain the sheets you will see in the master spreadsheet and what they are
There are three primary datasets received:
- Square Order Details: Data from the Square website.
- Food Form: A form where participants specify their food preferences.
- Declaration Form: A form where players declare their order numbers and the clubs they are representing.
These datasets are processed and mapped to create new datasets that link players between the different sources.
-
Progress
- Contains a button to process everything (or individual tasks).
- Shows the progress of the current run.
- Shows errors (if any).
-
Players
- Maps data from the Square orders to the Declarations.
- Lists players, their clubs, and additional columns of relevant data.
-
Missing Declarations
- Lists people who have placed an order but haven't submitted a declaration.
- This list should get smaller as the tournament date approaches. I guess we will contact whoever still hasnt made a declaration by x date.
-
Incorrect Order Number
- Contains declarations with order numbers that cannot be matched to the Square data.
- Requires manual intervention to resolve these discrepancies. We will either have to contact these people or try to solve it ourselves if we can.
-
Duplicate Name
- Identifies people with multiple orders under the same name.
- This is likely fine as people have bought tickets for their friends, but its nice to be able to track this.
-
Club
- Lists all clubs, the number of players declared for each, and links to their unique spreadsheets.
-
Food Order Complete
- Lists all players who have declared their food preferences along with the necessary details.
Apart from populating the above sheets, the script performs the following tasks:
-
Club Spreadsheets: For each registered club, a unique spreadsheet is created containing:
- A list of all registered players.
- Sheets for timings, questions, etc.
- These spreadsheets are stored inside the Info Packs folder, and sent to each club's coordinator.
-
Lions Sheet: A separate sheet is populated for Lions, providing:
- A list of attending players.
- Player count.
- Food choices and dietary requirements.
- This will be its own spreadsheet as we need to give this to the club
To contribute I have set this repo up so all you have to do is fork this, create a new branch for whatever fix you're making, then once this is done, create a merge request. Only I can approve them. :D
- Try out eslint
- Remove eslint (I hate it. I hate the fact that I thought it would be better)
- Be cool
- Create issues for all of these so they're linked here
- Maybe format into folders so we have a little bit of a better structure within the code. This only makes sense if it's getting a bit too complex. So will not yet.
- Text/Background colours being used in magic strings{1}
- Clearing player sheet clears the whole sheet and the formatting{2}
- Lions sheet not being properly cleared / count in wrong place{3}
- Create Food Master sheet{5}
- Write a well-documented readme.{6}
- Write explanation for the "complicated" functions{7}
- Cleanup innecessary comments{8}
- Look into creating proper classes for data sets{9}
- Create a github cronjob and script so new issues are added and linked to the readme automatically{10}
- De-complicate userFeedback.js, make it also a bit less over the top in the "UI"{11}
- Properly name "main" function in the standalone workers. Create buttons for them in the google sheet{12}
- Try pasting the whole values in range rather than going line by line,. improve performance{13}
- Add club sheets{15}
- Add "Food order complete" sheet{16}
- Separate errors sheet {17}
- Implement async functions to make asyncronous and faster, especially the club spreadsheets{18}
- Formalize Food Form data as it is currently bad.{19}
- Make sure making this repo public is secure and im not sharing anything I should't{20}
- Create folders to make it a bit easier on the eye{21}
- Add slightly better error handling{22}
- Add proper status processing to progress sheet{23}
- Fixes #23 and fixes #22{24}
- Food Form/Requirements work{4}
- Add duplicate peoples name to error sheet{14}
- Move "data" sheets onto a new spreadsheet{25}