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

Re-cache RP information when finalizing regattas #15

Open
openwebsolns opened this issue Jul 3, 2024 · 0 comments
Open

Re-cache RP information when finalizing regattas #15

openwebsolns opened this issue Jul 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@openwebsolns
Copy link
Owner

Summary

The process of finalizing a regatta, whether via the user pane or the "autofinalize script", does not reset RP cache information for the teams. This can lead to some teams in the regatta being labeled as dt_rp_complete = null incorrectly. This can be even more confusing because when vising the "Missing RP" page, Techscore properly indicates that all teams have complete RP data.

Reproducing

  1. Create a regatta with 2 races and 2 teams, A and B.
  2. Enter RP information for only the first race for team A. Enter RP information for both races for team B.
  3. Add finishes for first race only
  4. Finalize the regatta, which will remove the unsailed second race

After step 2, team A has an incomplete RP (dt_rp_complete = null) because there is no entry for race 2. Meanwhile, team B has a complete RP (dt_rp_complete = 1) because it has entries for both races. After step 4, when the second race is removed from the regatta, team A's RP is now technically complete, since it includes data for all available races. However, because dt_rp_complete was not reset as part of finalizing the regatta, it still indicates incompleteness.

Resolution

Reset team's RP cache when finalizing a regatta. E.g.:

$rpManager->resetCacheComplete($team);
@openwebsolns openwebsolns added the bug Something isn't working label Jul 3, 2024
@openwebsolns openwebsolns self-assigned this Jul 3, 2024
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

1 participant