Skip to content

PM-5370 - return winner placement - #143

Merged
vas3a merged 1 commit into
developfrom
PM-5370_campus-leaderboard
Aug 20, 2026
Merged

PM-5370 - return winner placement#143
vas3a merged 1 commit into
developfrom
PM-5370_campus-leaderboard

Conversation

@vas3a

@vas3a vas3a commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

This pull request updates the campus leaderboard report to track and display all placements (not just wins) for Topcoder challenges, and adds tests to ensure non-winning placements are correctly handled. The changes also clarify the definition of a "win" in the leaderboard logic.

Leaderboard SQL logic updates:

  • The CTE previously named member_wins is renamed to member_placements and now includes all placements, not just first place. The logic for determining a "win" is updated to check for placement = 1 instead of filtering at the SQL level.
  • The participation CTE and all related joins are updated to use member_placements instead of member_wins, ensuring all placements are considered throughout the report. [1] [2]
  • The won field in the leaderboard output is now computed as win.member_id IS NOT NULL AND win.placement = 1, so only first-place finishes are counted as wins, while other placements are still tracked.

Test coverage improvements:

  • Added a test to verify that non-winning placements (such as 2nd and 3rd place) are returned and correctly represented in the leaderboard results.

@vas3a
vas3a merged commit 108dc38 into develop Aug 20, 2026
5 checks passed
@vas3a
vas3a deleted the PM-5370_campus-leaderboard branch August 20, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant