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.
- issue: #511469 (closed)
- epic: &16157 (closed)
- design: #508722[modal_full_screen.png]
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
- have a GitLab Ultimate licence
- navigate to the vulnerability details page (
http://gdk.test:3000/[path/to/project]/-/security/vulnerabilities/[id])- 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
- in the sidebar, choose
Secure=>Vulnerability report - click on a vulnerability
- navigate to a project in a group (because the feature flag checks the
- test the "Change severity" action
- it should open a modal with a form with two required fields: severity dropdown and comment textarea
- when the form is submitted, it should call the severity override mutation with a
newSeverityand acomment
- run tests:
yarn install && yarn jest vulnerabilit
Edited by Miranda Fluharty