Error loading Vulnerability List when Linked issue has been moved

Summary

When creating an issue from a given vulnerability and moving the issue to a different project, vulnerabilities no longer load.

Steps to reproduce

  1. Open a vulnerability on a projectA
  2. Create issue from vulnerability
  3. Move issue to different projectB
  4. Access projectA security dashboard and see Error fetching the vulnerability list. Please check your network connection and try again.

Example Project

https://gitlab.com/gitlab-org/security-products/analyzers/pmd-apex/-/security/dashboard/?state=DETECTED&state=CONFIRMED

What is the current bug behavior?

Vulnerabilities fail to load

What is the expected correct behavior?

Vulnerabilities should load regardless of where the issue lives

Relevant logs and/or screenshots

Screen_Shot_2020-08-05_at_3.04.27_PM

Output of checks

This bug happens on GitLab.com

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)

Possible fixes

  • backend Add in EE::Issues::MoveService logic to update issue_id of all Vulnerabilities::IssueLink with new moved Issue.id
Edited by Alan (Maciej) Paruszewski