Add action dropdown to vulnerability report selection summary

Proposal

Add a dropdown with 3 possible actions in the selection summary of the vulnerability report. At the moment, after selecting vulnerabilities, the only possible action is changing the status. This will be enhanced with other actions related to linking vulnerabilities to issues. Therefore, we need a dropdown where the user can select the action before some follow-up UI is rendered.

The following actions are available:

  1. "Change status"
  2. "Create new issue"
  3. "Attach to existing issue"

action-dropdown

Relevant links

Non-functional requirements

  • Documentation:
  • Feature flag: enhanced_vulnerability_bulk_actions

Implementation steps

  • Add new feature flag definition enhanced_vulnerability_bulk_updates
  • Make distinction in selection_summary.vue based on enhanced_vulnerability_bulk_updates between A: changing status vs B: action dropdown
  • Add dropdown with 3 actions to selection_summary.vue. Based on the chosen action, conditionally render follow-up UI to the right. At first, only the "Change status" action will have such a follow-up as this is what's currently implemented.
  • Move "Change status" functionality contained within selection_summary.vue to another component
  • Adapt testing of selection_summary_spec to test this action dropdown

Verification steps

  1. Go to https://gitlab.com/gitlab-org/govern/threat-insights-demos/verification-projects/security-reports/-/security/vulnerability_report
  2. Select a couple vulnerabilities by clicking the checkboxes
  3. Verify that the selection summary now first shows a dropdown called "Select action" where you can click the option "Change status". Later more actions will be added.
  4. Verify that after selecting "Change status", you can use the "Select status" dropdown to select a status and add a comment (and dismissal reason when choosing the dismissed status).
Edited by Lorenz van Herwaarden