Linked Issue should not suggest existing Linked Issues
Summary
When adding new Linked Issues, the Auto-Suggestion box suggests the following incorrect items:
- it suggests the Issue itself
- it suggests Issues already added to the Linked Issues section
Steps to reproduce
- Create 2 Issues
- In the 1st Issue (i.e. Issue 1), click on the
+
button for the Linked Issue. -
Observe that Issue 1 and Issue 2 are both suggested. Issue 1 shouldn't suggest itself! - Add Issue 2 as a Linked Issue.
- Click on
+
button for the Linked Issue again. -
Observe that Issue 1 and Issue 2 are again suggested. Issue 2 shouldn't be re-suggested!
Example Project
What is the current bug behavior?
Both the current Issue, and existing Linked Issues, are suggested.
What is the expected correct behavior?
The current Issue, and existing Linked Issues, should not be suggested.
Relevant logs and/or screenshots
An existing Linked Issue is re-suggested
The current Issue is suggested as its own Linked Issue
Output of checks
Results of GitLab environment info
GitLab Community Edition 13.7.1
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)