Close aggregated abuse reports
What does this MR do and why?
- Resolves sub-task 3 of https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/180
- We started aggregating abuse reports in !120958 (merged)
- In this MR, once an aggregated abuse report is closed, all abuse reports part of that are closed as well.
Screenshots or screen recordings
Before | After |
---|---|
close-abuse-reports-before | close-abuse-reports-after |
How to set up and validate locally
- In rails console
> Feature.enable(:abuse_reports_list)
# create 2 abuse reports for the same user and category
> User.limit(2).order_id_asc.pluck("id").each { |i| AbuseReport.create(reporter_id: i, user_id: User.last.id, status: "open", category: "spam", message: "test") }
- Log-in as
admin
and navigate to/admin/abuse_reports
. You should see text sayingUser X reported for spam by 2 users
. - Open the abuse report and close it from the
Actions
button. - Navigate back to
/admin/abuse_reports
. Both the reports would have been closed.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Hinam Mehra