Project

General

Profile

Defect #16260 » parent_task.patch

This patch is based on 2.4.1.stable. - Domingo Galdos, 2014-03-06 19:57

View differences:

app/helpers/issues_helper.rb (revision 13612)
# Returns a link for adding a new subtask to the given issue
def link_to_new_subtask(issue)
subtask_tracker = issue.tracker
# try to use a tracker that actually allows being a subtask
if !subtask_tracker.core_fields.include?("parent_issue_id")
subtask_tracker = issue.project.trackers.select{ |t| t.core_fields.include?("parent_issue_id") }.first
subtask_tracker ||= issue.tracker
end
attrs = {
:tracker_id => issue.tracker,
:tracker_id => subtask_tracker,
:parent_issue_id => issue
}
link_to(l(:button_add), new_project_issue_path(issue.project, :issue => attrs))
(1-1/3)