Skip to content

Issues not closed when MR targets not the default branch

Summary

If a MR does not target the configured default branch, and the MR is merged, the according issue is not closed due to Closes #xy

Steps to reproduce

  • Create a branch
  • Create a ticket
  • Select the new branch to create MR from
  • Work work work...
  • Merge the branch via the MR
  • The related issue is not closed

The same with the default branch works...

  • Create a ticket
  • Create MR from default branch by not changing the configuration in the issue
  • Work work work...
  • Merge the branch via the MR
  • According standard configuration / text of a MR the issue is closed since it contains Closes #xy in the description

What is the current bug behavior?

  • If not the default branch is used for a MR, the directive Closes #xy is ignored, leading to unattended tickets and a big mess after a few days not paying attention

What is the expected correct behavior?

Closes #xy should be treated the same independant of the used branches to work with

Output of checks

This bug happens on GitLab.com