Skip to content

Limited Round Count in Group Mode #89

@mgeissen

Description

@mgeissen

✨ Feature: Limited Round Count in Group Mode

📖 User Story

As a tournament organizer
I want to restrict the number of rounds played in a group stage tournament
so that I can run time-efficient tournaments where not every possible matchup within a group needs to be played.

📝 Description

In group stage tournaments (Round Robin), the number of rounds played per group is currently always equal to the maximum number of possible matchups. This feature introduces an optional round limit per group stage, allowing organizers to define a fixed number of rounds to be played — for example, only 3 out of 4 possible rounds in a group of 5 Participants. This makes Turnonio more flexible for time-constrained tournament formats.

🎯 Acceptance Criteria

(Please formulate specifically and testably)

  • An organizer can optionally define a maximum number of rounds for the group stage during tournament setup
  • The system validates that the defined round limit does not exceed the maximum number of possible rounds for the given group size (e.g., max 4 rounds for a group of 5)
  • The system validates that the round limit is at least 1
  • The schedule is generated such that only the configured number of rounds is created, and not all possible matchups are included
  • If no round limit is set, the group stage defaults to the full number of rounds (current behavior)
  • The round limit configuration is only available for pure group stage tournaments — not when the KO (single/double elimination) mode is combined with the group stage
  • The tournament management UI clearly indicates that this option is incompatible with KO-mode and disables the input accordingly
  • The Live-Dashboard displays the total number of configured rounds and the current round progress (e.g., "Round 2 of 3")
  • Participants and spectators can see on the Live-Dashboard which rounds are being played and which matchups are not scheduled
  • In case of an odd number of participants in one group, a setting of round numbers would lead to some participants that would have one game less than the other
  • It is possible to adjust the rounds during a running group mode
  • The round limit is globally for all groups within a league

✅ Implementation TODO

(Break down the feature into concrete implementation tasks)

Tasks

  • Extend the tournament/group stage data model to include an optional maxRounds field
  • Create database migration to add max_rounds column to the group stage configuration table
  • Implement backend validation: maxRounds must be ≥ 1 and ≤ (groupSize - 1) (for standard Round Robin)
  • Adapt the round/matchup generation algorithm to stop after maxRounds rounds instead of generating all possible rounds
  • Add a maxRounds input field to the tournament management UI (Angular Material), only enabled when KO-mode is not active
  • Disable and visually annotate the maxRounds field when KO-mode is selected, with a clear tooltip or hint message
  • Expose maxRounds and currentRound via the existing REST API for tournament details
  • Update the Live-Dashboard (WebSocket feed) to display round progress, e.g., "Round 2 of 3"
  • Write unit tests for the round generation algorithm with a limited round count
  • Write integration tests for the validation logic (invalid inputs, KO-mode conflicts)

Created by the Turnonio Feature Agent 🤖🏆

Metadata

Metadata

Assignees

No one assigned

    Labels

    Live-DashboardIssue belongs to the live dashboard.TurnierverwaltungIssue belongs to "Turnierverwaltung"

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions