Skip to content

Resolve "Incorrect merge request title when Jira activated and multiple commits on branch"

Andrew McCallum requested to merge (removed):40793-fix-mr-title-for-jira into master

What does this MR do?

Uses the Issue / ExternalIssue classes to represent issue associated to merge request.

Parses out an issue identifier from the source branch only if the Gitlab issue tracker is enabled or an external issue tracker integration is enabled.

Are there points in the code the reviewer needs to double check?

Two things come to mind:

  • Should append_closes_description have return unless @issue given that @issue could be nil? It would avoid re-evaluating target_project.get_issue(issue_iid, current_user).
  • Is source_branch[issue_iid.length..source_branch.length] the best method to trim off the leading issue identifier?

Why was this MR needed?

To prevent humanized strings from breaking up EXMPL-1234 JIRA issue to Exmpl 1234 (#40793 (closed)).

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #40793 (closed)

Edited by Andrew McCallum

Merge request reports