Autoclosing issues no longer works when using external issue trackers
Summary
When using an external issue tracker like Jira issues are no longer automatically closed using issue closing patterns in merge requests when the internal GitLab issue tracker is disabled.
This appears to be a regression in %15.4 caused by 340dbccb as part of fixing #240922 (closed).
Steps to reproduce
- Set up Jira integration and disable the internal issue tracker.
- Create a merge request where the description contains an issue closing pattern for a project matching the Jira integration.
- Merge the MR.
- The resultant merge commit will not have a
Closes
comment nor will the external issue be closed.
Example Project
See GitLab support portal ticket 330592.
What is the current bug behavior?
Issue closing patterns are always ignored whenever the internal Gitlab issue tracker is disabled for the project.
What is the expected correct behavior?
Issue closing patterns should work when the internal issue tracker is disabled in case an external issue tracker is in use.
Output of checks
This bug happens on GitLab.com
Workaround
Enable issues on the affected projects. The code path to close Jira issues will then be enabled.
Possible fixes
Removing this line should fix it: https://gitlab.com/gitlab-org/gitlab/-/blob/v15.4.0-ee/lib/gitlab/closing_issue_extractor.rb#L31