Commit 44c8f919 authored by Benedikt Huss's avatar Benedikt Huss Committed by Benedikt Huß

Fix incorrect default merge request title when external issue tracker is activated

parent 639cfdc2
......@@ -159,7 +159,7 @@ module MergeRequests
merge_request.title =
case issue
when Issue then "Resolve \"#{issue.title}\""
when ExternalIssue then "Resolve #{issue.title}"
when ExternalIssue then merge_request.source_branch.titleize.humanize
end
end
......
---
title: Default merge request title is set correctly again when external issue tracker is activated
merge_request:
author:
type: fixed
......@@ -241,8 +241,8 @@ describe MergeRequests::BuildService do
allow(project).to receive(:external_issue_tracker).and_return(true)
end
it 'sets the title to: Resolves External Issue $issue-iid' do
expect(merge_request.title).to eq('Resolve External Issue 12345')
it 'sets the title to the humanized branch title' do
expect(merge_request.title).to eq('12345 fix issue')
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment