Call severity override mutation on modal submit

What does this MR do and why?

Call severity override mutation on modal submit

Submitting a severity change on the vulnerability details page
via the "Change severity" action in the "Edit vulnerability" dropdown
should call the mutation to update the severity of the vulnerability
and update the severity displayed on the page

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

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

Screenshots or screen recordings

Before After
modal submit did nothing Screen_Recording_2025-02-11_at_09.08.35
modal submit calls the mutation to update the vulnerability

How to set up and validate locally

git checkout 511469-make-modal-submit-call-mutation
echo "Feature.enable(:vulnerability_severity_override)" | gdk rails c
  1. have a GitLab Ultimate licence
  2. navigate to the vulnerability details page (http://gdk.test:3000/[path/to/project]/-/security/vulnerabilities/[id])
    1. navigate to a project in a group (because the feature flag checks the root_ancestor) that has detected vulnerabilities
      • need a test project? clone this project and run a pipeline to generate some vulnerabilities
    2. in the sidebar, choose Secure => Vulnerability report
    3. click on a vulnerability
  3. test the "Change severity" action
    1. it should open a modal with a form with two required fields: severity dropdown and comment textarea
    2. when the form is submitted, it should call the severity override mutation with a newSeverity and a comment
  4. run tests: yarn install && yarn jest vulnerabilit
Edited by Miranda Fluharty

Merge request reports

Loading