/TourneyScripts

Set of google sheet scripts that will help with the organization of the LCKC Tournament.

Primary LanguageJavaScript

Tournament Data Management Scripts for 2024

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.

Google Sheets Integration

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

Sheets in master spreadsheet

Here I will explain the sheets you will see in the master spreadsheet and what they are

Data Sources

There are three primary datasets received:

  1. Square Order Details: Data from the Square website.
  2. Food Form: A form where participants specify their food preferences.
  3. 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.

Script-Populated sheets

  1. Progress

    • Contains a button to process everything (or individual tasks).
    • Shows the progress of the current run.
    • Shows errors (if any).
  2. Players

    • Maps data from the Square orders to the Declarations.
    • Lists players, their clubs, and additional columns of relevant data.
  3. 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.
  4. 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.
  5. 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.
  6. Club

    • Lists all clubs, the number of players declared for each, and links to their unique spreadsheets.
  7. Food Order Complete

    • Lists all players who have declared their food preferences along with the necessary details.

Additional Features

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

Contributions

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

TODO List

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

Issues