diff options
author | Gabriel Gizotti <gabriel@gizotti.com> | 2016-11-24 19:21:27 +1000 |
---|---|---|
committer | Gabriel Gizotti <gabriel@gizotti.com> | 2016-12-16 19:13:17 +1000 |
commit | 80915c35f48463c3a983129961f3130bd9703754 (patch) | |
tree | 11d4711726678939b02102c185c3410ccfa17c8b /app/helpers/merge_requests_helper.rb | |
parent | 1a8f43ff3e5481d65f547ac01c03e2d64e14fff0 (diff) | |
download | gitlab-ce-80915c35f48463c3a983129961f3130bd9703754.tar.gz |
diplays mentioned but not merged message on MR show page
Diffstat (limited to 'app/helpers/merge_requests_helper.rb')
-rw-r--r-- | app/helpers/merge_requests_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb index a6659ea2fd1..dcd35dc6282 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -59,6 +59,17 @@ module MergeRequestsHelper @mr_closes_issues ||= @merge_request.closes_issues end + def mr_issues_mentioned_but_not_closing + @mr_issues_mentioned_but_not_closing ||= @merge_request.issues_mentioned_but_not_closing + end + + def mr_issues_mentioned_but_not_closing_message + verb = mr_issues_mentioned_but_not_closing.size > 1 ? 'are' : 'is' + issue_text = 'issue'.pluralize(mr_issues_mentioned_but_not_closing.size) + + "The following #{issue_text} #{verb} mentioned but not being closed:" + end + def mr_change_branches_path(merge_request) new_namespace_project_merge_request_path( @project.namespace, @project, |