Commit bcf88c85 authored by Vinnie Okada's avatar Vinnie Okada

Fix external issue links

Display the project path in links to issues in other projects that use
an external issue tracker.
parent 088987e2
...@@ -210,7 +210,8 @@ module Gitlab ...@@ -210,7 +210,8 @@ module Gitlab
config = Gitlab.config config = Gitlab.config
external_issue_tracker = config.issues_tracker[project.issues_tracker] external_issue_tracker = config.issues_tracker[project.issues_tracker]
if external_issue_tracker.present? if external_issue_tracker.present?
reference_external_issue(identifier, external_issue_tracker, project) reference_external_issue(identifier, external_issue_tracker, project,
prefix_text)
end end
end end
end end
...@@ -253,7 +254,7 @@ module Gitlab ...@@ -253,7 +254,7 @@ module Gitlab
end end
def reference_external_issue(identifier, issue_tracker, project = @project, def reference_external_issue(identifier, issue_tracker, project = @project,
_ = nil) prefix_text = nil)
url = url_for_issue(identifier, project) url = url_for_issue(identifier, project)
title = issue_tracker['title'] title = issue_tracker['title']
...@@ -261,7 +262,7 @@ module Gitlab ...@@ -261,7 +262,7 @@ module Gitlab
title: "Issue in #{title}", title: "Issue in #{title}",
class: "gfm gfm-issue #{html_options[:class]}" class: "gfm gfm-issue #{html_options[:class]}"
) )
link_to("##{identifier}", url, options) link_to("#{prefix_text}##{identifier}", url, options)
end end
end 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