Skip to content

Use confirm variant in create jira issue graphql

What does this MR do and why?

Related #329780 (closed)

The graphql version of the create jira issue button on the vulnerability details page has been behind a feature flag (create_vulnerability_jira_issue_via_graphql) for a very long time. Therefore, it's still using the success variant by default. That variant should not be used anymore in this situation. It should be the "confirm" variant instead.

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

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

Before After
before after

How to set up and validate locally

Prerequisites

  1. You need an EE license
  2. You 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

Jira integration

Instead of the setting up the full Jira integration, you can also replace v-if="createJiraIssueUrl" with v-if="true" on line 211 in ee/app/assets/javascripts/vulnerabilities/components/footer.vue

Click to expand

Enable the Jira integration for a project:

  1. Create a Jira test project at https://jira.atlassian.com/ and get an API key at Account settings > Security
  2. Navigate to the security-reports project
  3. Go to Settings > Integrations > Jira
  4. Enable the integration and fill out the form
  5. Enable "Jira Issues" and "Issue creation from vulnerabilities"

Validate

  1. Enable the feature flag: echo "Feature.enable(:create_vulnerability_jira_issue_via_graphql)" | gdk rails c
  2. Go to the vulnerability details page of a vulnerability (Security Reports > Vulnerability report > Click any vulnerability)
  3. Validate that the "Create jira issue" button is of the "confirm" variant
Edited by Lorenz van Herwaarden

Merge request reports