Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quitting a competitor suggests wrong replacement when their prior results changed #221

Open
julesDesjardin opened this issue Jul 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@julesDesjardin
Copy link

Hi,

When fixing a scoretaking mistake after a competition, I changed the R1 results of a competitor, and then cleared their results and quit them from R2 because they no longer qualified for the round.

Instead of giving me the correct competitor as a replacement, WCA Live gave me the competitor behind the unqualified competitor with their new result.

To be more clear, here is the affected round. Romain Stefan was initially qualified, but then wasn't anymore. I cleared his result, and quit him, and it suggested Samuel Jehanno, when it should have suggested Gabin Thiery. (Based on a later test on a local instance of Live, clicking "yes" would have indeed accepted Samuel instead of Gabin).

Based on the same local test, updating that competitor's results to a full DNF doesn't suggest a competitor to replace them with, because there is noone else with results after them now.

This feels like a pretty important bug, because as far as I know, this popup is the only way to accept new people into subsequent rounds, and it could be easily missed, and qualify the wrong competitor after a scoretaking mistake. My example isn't an issue because the competition is already over anyway, but it can also happen during a competition if the next round is opened before scorechecking is done.

Steps to reproduce:

  1. Enter some results in a first round.
  2. Open the second round.
  3. Change the result of a qualified competitor in the first round so that they don't qualify anymore.
  4. Quit them from the second round.
@jonatanklosko jonatanklosko changed the title When quitting a competitor from a subsequent round, the suggested competitor to replace them may be wrong Quitting a competitor suggests wrong replacement when their prior results changed Jul 8, 2024
@jonatanklosko jonatanklosko added the bug Something isn't working label Jul 8, 2024
@jonatanklosko
Copy link
Member

For more context, the reason for this behaviour is that we don't explicitly track which competitors quit. Instead, when looking for replacement, we look at the previous round and effectively consider any gaps in the (green) advancement markers as competitors who already quit. This approach doesn't work as expected when the previous results are altered and the result changes its position.

because as far as I know, this popup is the only way to accept new people into subsequent rounds

I believe you can quit competitor from the next round without picking any replacement, and then use "Add competitor" to pick the next candidate, which should be the correct one in this case.

FWIW I think altering previous round as the next one is already ongoing is fairly unlikely and should be always done with care.

To improve this behaviour, when quitting a competitor we could add a quit flag on their previous result. This way we wouldn't need the heuristic for treating "gaps in green markers" as competitors who quit. IIRC the main reason for this heuristic in the first place, was that the prior implementation of WCA Live operated on WCIF directly and I wanted to avoid adding attributes to the document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants