Skip to content

Add form error messages to vulnerability report bulk updates

What does this MR do and why?

Relates to #410606 (closed)

For bulk updates on the vulnerability report, improvements have been made that make sure the proper error messages are shown for each input/selection when submitting the form instead of simply disabling the submit form button.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
set-status-before set-status-after
status-error-after
dismiss-before dismiss-after
comment-before comment-after

How to set up and validate locally

Prerequisites

  1. You'll need an EE license
  2. You'll need to have runners enabled (See $2408961 for setting up a runner)
  3. Import https://gitlab.com/gitlab-examples/security/security-reports
  4. Run a pipeline on master

Validate

  1. Go to security-reports vulnerability report
  2. Select a couple of vulnerabilities
  3. Select Change status and validate that an error message appears underneath the status listbox
  4. Select the status "Dismiss" and validate that the error message disappears
  5. Select Change status and validate that error messages appear underneath the dismissal reason listbox and the comment input
  6. Select a dismissal reason and validate that the error message disappears
  7. Add a comment and validate that the error message disappears
  8. Select Change status and validate that it succeeds
  9. Select some vulnerabilities again and select any status except the "Dismiss" status
  10. Select Change status and validate that it succeeds (comment is not required)

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 Lorenz van Herwaarden

Merge request reports