FEATURE: add support for "Flagged By" filter in reviewable (#30197)

Previous to this change there was no way to find all the flags
a user raised.

New filter allows you to find all the flags raised by a user.
This commit is contained in:
Sam
2024-12-10 18:26:38 +11:00
committed by GitHub
parent cd8e03086f
commit 58e3e0cc4f
7 changed files with 78 additions and 11 deletions

View File

@@ -32,9 +32,16 @@ class ReviewablesController < ApplicationController
additional_filters: additional_filters.reject { |_, v| v.blank? },
}
%i[priority username reviewed_by from_date to_date type sort_order].each do |filter_key|
filters[filter_key] = params[filter_key]
end
%i[
priority
username
reviewed_by
from_date
to_date
type
sort_order
flagged_by
].each { |filter_key| filters[filter_key] = params[filter_key] }
total_rows = Reviewable.list_for(current_user, **filters).count
reviewables =