Jira Integration - create issue in Jira using API
Why are we doing this work
Currently our MVC for Jira integration for Vulnerabilities is using special link generated in Jira that allows to create issue easily. However this method is no longer officially supported. We need to switch to use Jira REST API instead. The flow for the users will be very similar: users will click on button on Single Vulnerability page to create issue in Jira, then we will do the call to our API to start issue creation. When everything is ok and the issue is created, we are storing the internal link between Jira issue and Vulnerability and present that information for users. In case of failure we are responding with error message.
#8942[b1-details-page-jira-enabled.png] #8942[b2-details-page-jira-enabled_issue-creation-state.png] #8942[b3-details-page-jira-enabled_issue-created.png] #8942[b4-details-page-jira-enabled_error-state.png]
Relevant links
Non-functional requirements
-
Documentation: documentation has to be added, -
Feature flag: jira_for_vulnerabilities
- disable issue creation when feature flag is disabled - [-] Performance:
-
Testing:
Implementation plan
-
backend create service that creates issue in Jira internally, extend JiraService
with method to create issue in Jira (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post) and create link between Vulnerability and Jira Issue usingVulnerabilities::ExternalLink
(#276897 (closed)) -
backend create mutation in GraphQL to create issue from Vulnerability, -
backend catch all errors from Jira and return them in the mutation response
-
-
backend modify ee/app/finders/projects/integrations/jira/issues_finder.rb
to return issues related to vulnerability based on the created link