Allow removal of issues marked as duplicate
Summary
When an issue is marked as a duplicate of another via /duplicate quick action, there's no way to unlink them. Even if it's re-added as a Related issue, it doesn't seem to lose its "duplicate" relationship, so that when the original issue is closed, it is always considered to be Closed (Duplicated). This is also more problematic when you mistakenly added the duplicate association but you can never remove it.
Steps to reproduce
- Create issue
A - Add another issue
B, and inA- you accidentally mark B as a duplicate:/duplicate B - Close
A - It always shows up as
Closed (Duplicate)
Working example in an Internal Slack discussion in #s_plan: https://gitlab.slack.com/archives/C72HPNV97/p1596051855317900
Example Project
Noted behaviour in: #15356 (comment 387814369)
What is the current bug behavior?
Can never remove the "duplicated" association
What is the expected correct behavior?
Provide some way to remove the duplicate, e.g. /remove_duplicate quick action
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
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
(If you can, link to the line of code that might be responsible for the problem)