-
-
Notifications
You must be signed in to change notification settings - Fork 8
[FEATURE] Tournament Reset/Override #422
Copy link
Copy link
Open
Description
Add tournament bracket reset and team override for organizers
Tournament organizers currently have no way to fix a bugged match result or correct wrong team
assignments. Once winning_lineup_id is set, bracket progression is permanent. The only option is
deleting the entire tournament.
Problem
- Game server reports wrong winner → bracket progression is permanently wrong
- Auto-forfeit picks wrong team → downstream brackets get incorrect teams
- Bug causes match to not schedule → bracket sits forever with no recovery path
- No mechanism to undo, replay, or override any tournament match result
Solution
Two new organizer actions accessible from the bracket viewer UI:
Reset Match (reset_tournament_bracket)
- Deletes the match on the target bracket and all downstream brackets
- Keeps teams on the target bracket (for replay)
- Clears team assignments on all downstream brackets
- Re-derives valid assignments from unaffected completed brackets
- Resolves byes and auto-schedules ready matches
- Runs in a single SQL transaction for data integrity
Override Teams (override_bracket_teams)
- Manually assigns teams to any bracket slot
- If bracket has existing results, cascade-resets downstream first
- Trigger auto-schedules the new match when both teams are present
Scope
| Layer | Changes |
|---|---|
| SQL | 2 new PL/pgSQL functions |
| API | 2 new Hasura actions + NestJS handlers (authorization + PostgresService.query()) |
| Web | Reset button on TournamentMatch.vue + new BracketTeamOverrideDialog.vue |
Dependencies
Depends on the assign_team_to_bracket_slot IS NULL guard fix from the tournament blockers issue (the
reset function calls it during re-derivation).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Ready