Skip to content

Implement show and adding/removing labels to an abuse report

Eugie Limpin requested to merge el-abuse-report-labels into master

What does this MR do and why?

Partially resolves https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/167+

This MR implements:

  1. Showing labels added to an abuse report
  2. Searching labels that can be added/removed to/from an abuse report
  3. Adding and removing labels to an abuse report

Label creation is handled in Implement create abuse report labels (!129205 - merged).

Related MRs

  1. Add GraphQL endpoints to fetch abuse report and... (!128219 - merged)
  2. Rename AbuseReportUpdateService to AbuseReports... (!128085 - merged)
  3. Implement show abuse report labels and adding/removing labels to an abuse report 👈🏼 You are here
  4. Implement create abuse report labels (!129205 - merged)

Screenshots or screen recordings

Screen_Recording_2023-08-09_at_11.55.06_AM

How to set up and validate locally

  1. In rails console, enable the feature flag and create some labels
    > Feature.enable(:abuse_report_labels)
    > ['Uno', 'Dos', 'Tres'].each { |t| Admin::AbuseReportLabel.create(title: t) }
  2. Login with an admin user (root)
  3. Go to abuse reports page (http://localhost:3000/admin/abuse_reports) and click on any abuse report
  4. Validate that searching, adding, and removing labels to the abuse report works

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eugie Limpin

Merge request reports