Skip to content

Fix post-receive errors on a push when an external issue tracker is configured

What does this MR do?

This MR improves upon !766 (closed), fixing errors upon a git push that occur only when an external issue tracker (not JIRA) is used. This MR takes into account that external issue trackers, such as JIRA, may close issues. Disabling the processing of post-receive commits when an external issue tracker is configured seems like the wrong behavior.

Why was this MR needed?

When a user adds an issue reference, the refactoring in 8f8a8ab3 and a6defd15 caused project.get_issue to be called, causing ExternalIssue to be returned when an external issue tracker was configured. This object does not have a close method, as needed in CloseService. Nor does it make sense to associate a SystemNote with this object.

GitLab EE uses a special case for JIRA. I would recommend moving this logic into CloseService too.

What are the relevant issue numbers?

Merge request reports