johnridesabike / coronate

A Swiss-style chess tournament management app.
https://coronate.netlify.app/
Mozilla Public License 2.0
140 stars 22 forks source link

Players with byes get set to negative number of matches after deleting rounds #83

Closed mattbruv closed 10 months ago

mattbruv commented 10 months ago

Through a series of natural actions, I discovered a bug in which the UI will display a player as having negative matches:

image

Steps to recreate:

  1. Create an odd number of players
  2. Create a tournament and register those odd number of players
  3. Create a round, and auto pair the players. (One player will have a bye)
  4. Add results for all players so the round ends.
  5. Delete the round
  6. Navigate out of the tournament and back to players, and you will see negative rounds for the player(s) who took byes.
tissatussa commented 10 months ago

nice find ! (i didn't reproduce it yet)

i'm soon going to use this Coronate tool for our Rapid Tournament, this morning i did a test with 16 players, 3 rounds and dummy results and all went well and logical .. i trust this software, i guess bugs will always be there.

johnridesabike commented 10 months ago

I just pushed an update that should fix it. Thanks for the bug report!

mattbruv commented 10 months ago

Fixed for me. I tried fixing it myself but was having difficulty imagining how to fix it in a sensible way while learning ReScript, but I gave up after a bit due to my unfamiliarity with the language