Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show active users on leaderboards #8012

Merged
merged 6 commits into from
Nov 16, 2023

Conversation

chrismytton
Copy link
Member

Relevant issue(s)

Fixes #7946

What does this do?

Change the Statistics::Leaderboard class to only consider active users (i.e. users that haven't closed their account or been banned) from appearing on leaderboards.

Changed `.group('comments.user_id')` to `.group(:user)` to match the
InfoRequest-based methods above.
This tests that the InfoRequest.is_public bit in the leaderboards
methods is working as expected.
@mysociety-pusher mysociety-pusher force-pushed the 7946-only-active-users-in-leaderboards branch from d701400 to 8efc81a Compare November 14, 2023 14:41
@mysociety-pusher mysociety-pusher force-pushed the 7946-only-active-users-in-leaderboards branch from 8efc81a to eb2892d Compare November 14, 2023 14:42
Copy link
Member

@garethrees garethrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Good to merge as is. If it's quick and easy would be worth doing for the request game too (/categorise/play), but not worth hours of work if it's a faff.

@mysociety-pusher mysociety-pusher force-pushed the 7946-only-active-users-in-leaderboards branch from 32fad1a to 4be3380 Compare November 15, 2023 14:17
Copy link
Member

@garethrees garethrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚡️ nice!

@garethrees garethrees merged commit 1070b65 into develop Nov 16, 2023
7 checks passed
@garethrees garethrees deleted the 7946-only-active-users-in-leaderboards branch November 16, 2023 19:04
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.

Only include active users in leaderboards
2 participants