When multiple issue-closing MRs are related to a single issue, any of them being merged closes the issue
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When multiple issue-closing MRs are related to a single issue, any of them being merged closes the issue. Given the text provided in the issue is When these merge requests are accepted, this issue will be closed automatically.
, my default expectation is that the logic would be When all of these merge requests are accepted
, not When any of these merge requests are accepted
.
For additional context, this was done in a project where we keep issues in a parent project group and the MRs are created under nested projects.
Steps to reproduce
- Open an issue
- Open at least 2 MRs across 2 separate sub-projects
- Relate the MRs to the issue (originally done by adding "Resolves: to the description of the MR)
- Merge one of the 2 MRs
- Evaluate the state of the issue
Example Project
I can develop one if needed. I cannot use the projects where this is occurring as an example, however the projects are all in the gitlab.com-managed version of the platform.
What is the current bug behavior?
The issue is closed when any related MR is closed.
What is the expected correct behavior?
The issue is closed when all related MRs are closed.
Relevant logs and/or screenshots
I can provide these from an example, if needed.
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
n/a
Results of GitLab application Check
n/a
Possible fixes
If possible, change the evaluation logic to auto-close issues such that it would only occur when all auto-issue-closing MRs are merged. Otherwise, I would accept updating the When these merge requests are accepted, this issue will be closed automatically.
message to specify which MRs would close the ticket (could be in conjunction with #28743 (closed), which seems to echo my confusion around that line) and specifying that closing any MR would close the ticket, for clarity.