rg2 icon indicating copy to clipboard operation
rg2 copied to clipboard

Add ability to update results without affecting existing routes

Open hansonwj opened this issue 4 years ago • 1 comments

This functionality will make it possible to have rg2 available at events (not just afterwards).

As competitors finish, admins will be able to upload updated xml files, and routes that have already been uploaded will be renumbered so that they are against the correct competitor. The recently-finished competitors will be able to upload their routes once the xml update has been done.

Alongside pull request 487, uploading routes should be simple on georeferenced maps.

This is the first step - ideally it would be possible to automate this process, however because a lot of parsing is done by the client before it is sent to the server, I've focused on getting it working from the client side first.

You may want to initially call this a 'beta' feature as I have only tested it on relatively 'normal' events.

How it works:

  • The user adds an intial course and results file.
  • The user lists all of the possible permutations of class to course.
  • These class to course mappings are added to the json payload when an event is created and saved in a new file (mappings_.txt)
  • When the event update is requested, the server checks the mappings file to see which courseid to map each result to ("Do not save" will remain ignored)
  • The server then updates the kilpailijat, kommentit and merkinnat files, adding new runners with correct courseid and updating the positions of previously-added runners.

hansonwj avatar Jul 18 '21 05:07 hansonwj

Note: currently sets a default value for variants so not recommended if you have variants in your courses. Will have a look at fixing this.

hansonwj avatar Aug 01 '21 03:08 hansonwj