diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-03-13 21:25:25 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-03-13 21:25:25 +0300 |
commit | cc4ca1f3fe2e2f7470c4fae9a9c5676bbebb18b6 (patch) | |
tree | d146fcb55dd01f9579ae1120c69056c36c3a36af /app/helpers | |
parent | 06c3c71bb8b15e4cad43cf890012ac869248b861 (diff) | |
parent | b55936bf0beb2b21de793e3dfc350a6ca1445db1 (diff) |
Merge branch '25515-delegate-single-discussion-to-new-issue' into 'master'
Create a new issue for a single discussion
See merge request !8266
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issues_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 4bdf07fe1ad..6978b0c89fd 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -134,6 +134,20 @@ module IssuesHelper options_from_collection_for_select(options, 'name', 'title', params[:due_date]) end + def link_to_discussions_to_resolve(merge_request, single_discussion = nil) + link_text = merge_request.to_reference + link_text += " (discussion #{single_discussion.first_note.id})" if single_discussion + + path = if single_discussion + Gitlab::UrlBuilder.build(single_discussion.first_note) + else + project = merge_request.project + namespace_project_merge_request_path(project.namespace, project, merge_request) + end + + link_to link_text, path + end + # Required for Banzai::Filter::IssueReferenceFilter module_function :url_for_issue end |