FEATURE: A low priority filter for the review queue. (#12822)

This filter hides reviewables with a score lower than the "reviewable_low_priority_threshold" setting. We only use reviewables that already met this threshold to calculate the Medium and High priority filters.
This commit is contained in:
Roman Rizzi
2021-04-23 15:34:24 -03:00
committed by GitHub
parent 4ccbecf480
commit 60059a7190
9 changed files with 87 additions and 23 deletions

View File

@ -48,4 +48,9 @@ DiscourseEvent.on(:site_setting_changed) do |name, old_value, new_value|
if SiteSetting::WATCHED_SETTINGS.include?(name)
SiteSetting.reset_cached_settings!
end
# Make sure medium and high priority thresholds were calculated.
if name == :reviewable_low_priority_threshold && Reviewable.min_score_for_priority(:medium) > 0
Reviewable.set_priorities(low: new_value)
end
end