Linked Jira issues with `Done` status no longer display on vulnerability records
Summary
When using the Jira/vulnerabilities integration, marking a Jira issue as Done
makes it disappear from the related vulnerability record in GitLab.
Steps to reproduce
- Make sure the
Enable Jira issue creation from vulnerabilities
option is checked/enabled in your project's Jira integration settings - Go to a vulnerability record on the same project that does not yet have any associated issues.
- Use the
Create Jira issue
button to open a new Jira issue. Finish creating the Jira issue. - Refresh the vulnerability record page and confirm the new Jira issues shows in the
Linked items
section. - Go back to the new Jira issue and change its status to
Done
. - Go back and refresh the vulnerability record page again and note that the Jira issue link no longer appears.
Example Project
https://gitlab.com/matt_wilson/simply-simple-notes
What is the current bug behavior?
The Jira issue link disappears from the vulnerability page when the Jira issue's status is set to Done
.
What is the expected correct behavior?
The Jira issue link should remain visible on the vulnerability record's Linked items
section regardless of its state.
This part was moved to the new issue:
In the case of a "final" state status like Done
, it would be acceptable (even preferable) to visually indicate this in the vulnerability report. When using GitLab issue creation/linking from vulnerabilities, we show closed issues with a different icon:
Relevant logs and/or screenshots
Here's a video walkthrough of the bug behavior:
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Implementation Plan
-
backend Update the external related issues url encoded in the vulnerability helper to request state=ALL
so that closed issues are fetched as well.