JIRA Integration - (FE) Add option to enable Jira issue creation from vulnerabilities
Overview
In a project's settings, there is the ability to add Jira integration:
On the Jira integration details page, add the option to enable Jira issue creation from vulnerabilities:
Design Issue
Other Considerations
-
@mparuszewski has created a proof of concept here: !46771 (diffs) Some of that code can be copied or used as a reference when working on this issue.
-
@lvanc mentioned in this comment: #8942[a3_Jira-integration_vuln-mgmt-disabled.png]
Currently, the Viewing of Jira issues in GitLab feature is only available to Premium and Silver plans. If the customer is on a lower tier plan, we display an "Upgrade your plan" button.
@matt_wilson replied:
Thanks for the heads up; it might. Vulnerability management is only available in Gold/Ultimate so we'll need an additional way to account for that. Perhaps either hide it from lower tier plans or replicate the upsell CTA.
Development Environment
In order to work on this locally it is necessary to sign up for Jira cloud and setup a testing project:
- https://www.atlassian.com/try/cloud/signup?bundle=jira-software&edition=free - Sign up with your gitlab-google account
- Create an example project with default settings
- Get an API-token from https://www.atlassian.com/try/cloud/signup?bundle=jira-software&edition=free (this is needed when configuring the gitlab-jira integration)
Designs
"Enable Jira issues" unchecked, "Enable creation from vulnerabilities" is hidden | "Enable Jira issues" checked, "Enable creation from vulnerabilities" is shown and unchecked by default |
---|---|
Checking "Enable creation from vulnerabilities" shows issue type selector | Issue type selected | Project key changed message shows when project key is changed |
---|---|---|
Error message | Tooltips |
---|---|
Implementation Plan
-
Add logic to app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue
:-
If for Gold/Ultimate users -
When "Enable Jira issues" checkbox is checked: -
Show "Enable Jira issue creation from vulnerabilities" checkbox to app/assets/javascripts/integrations/edit/components/jira_issues_fields.vue
and add logic to only render when the "Enable Jira issues" checkbox is checked
-
-
When "Enable Jira issue creation from vulnerabilities" checkbox is checked: -
Show issue type selector (note: use gl-button-group
to wrap the dropdown and refresh button)-
When Jira project key
is not present-
Show warning -
Disable issue type selector
-
-
When Jira projec keys
is present-
Fetch list of issue types (same same endpoint as "Test Connection" action / note: set issuetypes
default to either0
or10000
to satisfy validation - see comment for details)-
When successful -
Populate dropdown with data from response -
Enable dropdown
-
-
When error -
Show inline error alert with error message from response -
Disable dropdown
-
-
-
-
Whenever Jira project key
changes-
Show message to inform the user that they should refresh the issue-types list
-
-
-
-
-
Otherwise don't render anything or display upsell CTA (TBD)
-
-
Add specs
Feature Flags
Use existing :jira_for_vulnerabilities
feature flag