Commit 041bad0f authored by Marin Jankovski's avatar Marin Jankovski

Manipulate external tracker issues urls generated from services.

parent 7c701acf
...@@ -19,9 +19,7 @@ module IssuesHelper ...@@ -19,9 +19,7 @@ module IssuesHelper
if project.using_issue_tracker? if project.using_issue_tracker?
project_issues_path(project) project_issues_path(project)
else else
url = Gitlab.config.issues_tracker[project.issues_tracker]['project_url'] project.external_issue_tracker.project_url
url.gsub(':project_id', project.id.to_s).
gsub(':issues_tracker_id', project.issues_tracker_id.to_s)
end end
end end
...@@ -31,10 +29,7 @@ module IssuesHelper ...@@ -31,10 +29,7 @@ module IssuesHelper
if project.using_issue_tracker? if project.using_issue_tracker?
url = new_project_issue_path project_id: project url = new_project_issue_path project_id: project
else else
issues_tracker = Gitlab.config.issues_tracker[project.issues_tracker] project.external_issue_tracker.new_issue_url
url = issues_tracker['new_issue_url']
url.gsub(':project_id', project.id.to_s).
gsub(':issues_tracker_id', project.issues_tracker_id.to_s)
end end
end end
...@@ -44,10 +39,8 @@ module IssuesHelper ...@@ -44,10 +39,8 @@ module IssuesHelper
if project.using_issue_tracker? if project.using_issue_tracker?
url = project_issue_url project_id: project, id: issue_iid url = project_issue_url project_id: project, id: issue_iid
else else
url = Gitlab.config.issues_tracker[project.issues_tracker]['issues_url'] url = project.external_issue_tracker.issues_url
url.gsub(':id', issue_iid.to_s). url.gsub(':id', issue_iid.to_s)
gsub(':project_id', project.id.to_s).
gsub(':issues_tracker_id', project.issues_tracker_id.to_s)
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