List system notes on violation detail page

What does this MR do and why?

Add system notes to violation details page

References

Add notes field to ComplianceViolationType (!196682 - merged)

Screenshots or screen recordings

Violation-Details--Gitlab-Org-Gitlab-Shell--GitLab-07-15-2025_09_51_PM

How to set up and validate locally

  1. You need to have a group with Ultimate license.
  2. Ensure the feature flag is enabled: echo "Feature.enable(:compliance_violations_report)" | gdk rails console
  3. Required data, you can do either of following steps:
    1. You can checkout branch hraghuvanshi-comp-violations-seeder and run command FILTER=compliance_report_data SEED_COMPLIANCE_REPORT_DATA=1 GROUPID=<group_id> bundle exec rake db:seed_fu for filling required data and you can run query.
    2. Create all items manually:
      1. You need to have at least one project under the group, atleast one audit event related to the project.

      2. Also, have at least one compliance framework in the group, the framework should have atleast one compliance control.

      3. The framework should be applied to the project.

      4. Now create a compliance violation entry in the database by running following command in the rails console:

        ComplianceManagement::Projects::ComplianceViolation.create(project_id: <project_id>, namespace_id: <namespace_id>, audit_event_id: <audit_event_id>, compliance_requirements_control_id: <compliance_requirements_control_id>, status: 0, audit_event_table_name: 0)
  4. Navigate to the project that now has the violation, and go to path/to/project/-/security/compliance_violations/<violation-id>
  5. Add notes to violation by following these steps !196682 (merged)
  6. Validate the notes display

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #541093 (closed)

Edited by Nate Rosandich

Merge request reports

Loading