Skip to content
Snippets Groups Projects
Commit 44c8f919 authored by Benedikt Huss's avatar Benedikt Huss Committed by Benedikt Huß
Browse files

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

parent 639cfdc2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
 
Loading
Loading
---
title: Default merge request title is set correctly again when external issue tracker is activated
merge_request:
author:
type: fixed
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment