Issue type should be required in Jira integration settings
Summary
When setting up Jira Integration, and more specifically the "Create Jira issues for vulnerabilities" setting, the issue type dropdown is not required. However, this issue type is required when creating the vulnerability and results in an error if it is not set.
Steps to reproduce
Configure Jira integration without issue type
- In a project, go to Settings > Integrations > Jira > Configure
- Provide Web Url, Email, API token
- Select View Jira issues and provide Jira project key
- Select Create Jira issues for vulnerabilities
- Do not select Jira issue type
- Click Save
Create Jira issue from vulnerability
- Go to Vulnerability Report
- Select any vulnerability
- Scroll to bottom and select Create Jira issue
- There will be an error alert and the GraphQL mutation will fail
Example Project
To Do
What is the current bug behavior?
It's possible to select the Jira issue type, and this results in an error when creating a Jira issue from a vulnerability.
What is the expected correct behavior?
a. "This field is required." error label appears when saving without selecting a Jira issue type.
b. Auto select first option in dropdown
Relevant logs and/or screenshots
Configure Jira without issue type
Error alert when creating Jira issue
GraphQL error
{
"data": {
"vulnerabilityExternalIssueLinkCreate": {
"errors": [
"The issue type selected is invalid."
],
"externalIssueLink": null,
"__typename": "VulnerabilityExternalIssueLinkCreatePayload"
}
}
}
Possible fixes
Edited by Lorenz van Herwaarden