New issue button was not follows to external tracker if it is selected. fixed #3386
This commit is contained in:
parent
90db28d6d0
commit
242f6aa218
4 changed files with 48 additions and 1 deletions
|
@ -54,6 +54,18 @@ module IssuesHelper
|
|||
end
|
||||
end
|
||||
|
||||
def url_for_new_issue
|
||||
return "" if @project.nil?
|
||||
|
||||
if @project.used_default_issues_tracker?
|
||||
url = new_project_issue_path project_id: @project
|
||||
else
|
||||
url = Settings[:issues_tracker][@project.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
|
||||
|
||||
def url_for_issue(issue_id)
|
||||
return "" if @project.nil?
|
||||
|
||||
|
|
|
@ -13,5 +13,5 @@
|
|||
= link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn-small btn grouped" do
|
||||
Merge Request
|
||||
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
|
||||
= link_to new_project_issue_path(@project), title: "New Issue", class: "btn-small btn grouped" do
|
||||
= link_to url_for_new_issue, title: "New Issue", class: "btn-small btn grouped" do
|
||||
Issue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue