From d14d36b30b5fea95ec4d56dfc859ced87eac14b6 Mon Sep 17 00:00:00 2001 From: Jens Kraemer Date: Fri, 15 Sep 2017 18:49:57 +0800 Subject: [PATCH] try to always preselect a suitable tracker for new subtasks --- app/helpers/issues_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 972e6b9..c3a7d75 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -184,6 +184,9 @@ module IssuesHelper :parent_issue_id => issue } attrs[:tracker_id] = issue.tracker unless issue.tracker.disabled_core_fields.include?('parent_issue_id') + attrs[:tracker_id] ||= Issue.allowed_target_trackers(issue.project).detect do |tracker| + tracker.core_fields.include? 'parent_issue_id' + end link_to(l(:button_add), new_project_issue_path(issue.project, :issue => attrs, :back_url => issue_path(issue))) end -- 2.1.4