Skip to content

[BUG] The calculation of medals is not as expected #1982

@cubercsl

Description

@cubercsl

Description of the problem

The calculation of medals directly skips the teams not in Medal categories resulting in a decrease in the total number of medals.

Your environment

  • DOMJudge 8.1.4
  • Ubuntu 22.04 LTS
  • nginx

Steps to reproduce

image

  • Step 1: Create a contest and set the number of medals to 28, 56, 84 (i.e. 10%, 20%, 30% of total participants) for all teams from category Participants, and category Observers is the same sort order as Participants.
  • Step 2: Run the contest.

Expected behaviour

When the contest is running / After the contest is finished, there are 3 teams from Observers are ranked with 5, 13, 15 (in the gold medal area), gold medals should be awarded to 31st place, as these three teams do not give medals.

Actual behaviour

The gold medal was still handed out to 28th place and the 29th place was given a silver medal, which resulted in the wrong number of gold medals. This problem also exists in the Silver and Bronze areas, and scoreboard and award API's are both wrong.

Any other information that you want to share?

It may be the same problem as #1742, and 09d25cb should have fixed it (only in scoreboard), but the refactoring in 42daadc introduces this issue again in 8.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions