Skip to content

fix: secondary tiebreaker sorting for orgs when they have the same contribution count (IN-991)#3885

Merged
epipav merged 1 commit intomainfrom
bugfix/tb-org-leaderboard-sorting-tie-breaker
Mar 4, 2026
Merged

fix: secondary tiebreaker sorting for orgs when they have the same contribution count (IN-991)#3885
epipav merged 1 commit intomainfrom
bugfix/tb-org-leaderboard-sorting-tie-breaker

Conversation

@epipav
Copy link
Collaborator

@epipav epipav commented Mar 2, 2026

When multiple orgs had the same contributor_count (primary sort field), sorting was not deterministic, which could cause the same org to appear on different pages.

Added org.id as a secondary sort key to ensure stable ordering and consistent pagination.


Note

Low Risk
Low risk: changes only the ORDER BY clause to make pagination deterministic when contribution counts tie; results order may shift for tied orgs but no data shape or calculations change.

Overview
Ensures deterministic ordering for the organizations leaderboard by adding id as a secondary sort in organizations_leaderboard.pipe (ORDER BY contributionCount DESC, id DESC).

This prevents tied contributionCount rows from reordering between requests/pages, improving pagination consistency.

Written by Cursor Bugbot for commit aa7da4b. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@epipav epipav self-assigned this Mar 2, 2026
@epipav epipav added the Bug Created by Linear-GitHub Sync label Mar 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@epipav epipav requested a review from gaspergrom March 2, 2026 12:54
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@epipav epipav changed the title fix: secondary tiebreaker sorting for orgs when they have the same contribution count fix: secondary tiebreaker sorting for orgs when they have the same contribution count (IN-991) Mar 2, 2026
@epipav epipav merged commit b2164b4 into main Mar 4, 2026
21 checks passed
@epipav epipav deleted the bugfix/tb-org-leaderboard-sorting-tie-breaker branch March 4, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants