Use 'vulnerabilityExternalIssueLinkCreate' mutation for creating a Jira issue on pipeline security tab
Why are we doing this?
Currently we are using a link, provided by the backend, to create new Jira issues:
Create Jira Issue |
---|
In order to move the pipeline security tab to GraphQL we need to use the vulnerabilityExternalIssueLinkCreate
mutation to create the Jira issue.
Create external issue - mutation example
mutation vulnerabilityExternalIssueLinkCreate($input:VulnerabilityExternalIssueLinkCreateInput!) {
vulnerabilityExternalIssueLinkCreate(input:$input) {
errors,
externalIssueLink {
externalIssue {
webUrl
}
}
}
}
{
"input": {
"externalTracker": "JIRA",
"linkType": "CREATED",
"id": "gid://gitlab/Vulnerability/158"
}
}
Relevant links
Epic | &4969 (closed) |
Design issue | #8942 (closed) |
Non-functional requirements
-
Documentation: screenshots need to be updated and text modified if necessary -
Testing: tests need to be updated
Implementation Plan
-
Change ee/app/assets/javascripts/security_dashboard/components/vulnerability_action_buttons.vue
to use the mutation from the example above -
Display a loading state (Design TBD) -
Show a success feedback (Design TBD) -
In case of error give the user a feedback (Design TBD)
Open Questions
- UX
-
How should we indicate the loading, success and error states?
-
Edited by David Pisek