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

✨ Add a priority score value for ozone subjects #3495

Merged
merged 16 commits into from
Feb 6, 2025
Merged

Conversation

foysalit
Copy link
Contributor

@foysalit foysalit commented Feb 4, 2025

This PR allows moderators to set an arbitrary numeric value to any subject, as its priority score. Then, when querying statuses, subjects can be sorted by this value.

Copy link
Contributor

@matthieusieben matthieusieben left a comment

Choose a reason for hiding this comment

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

looks pretty straight forward

Comment on lines 1107 to 1113
if (minPriorityScore != null && minPriorityScore > 0) {
builder = builder.where(
'moderation_subject_status.priorityScore',
'>=',
minPriorityScore,
)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure we don't want to allow priorityScore to be 0?

This would allow to distinguish "items with a priority score defined" from items "without a priority score (priority unknown)"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah good point, I don't see a use-case for this right now but doesn't hurt to allow it.

@foysalit foysalit merged commit 709a85b into main Feb 6, 2025
10 checks passed
@foysalit foysalit deleted the ozone-priority-score branch February 6, 2025 20:54
@github-actions github-actions bot mentioned this pull request Feb 6, 2025
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.

2 participants