Project

General

Profile

Patch #32109 » obey-subtask-settings-411.patch

Applies the settings of the sub-task to a new issue in 4.1.1 - Anonymous, 2021-04-12 10:08

View differences:

app/models/issue.rb (working copy)
# Returns a scope of projects that user can assign the issue to
def allowed_target_projects(user=User.current, context=nil)
if new_record? && context.is_a?(Project) && !copy?
current_project = context.self_and_descendants
elsif new_record?
current_project = nil
else
current_project = project
end
case Setting.cross_project_subtasks
when 'system'
current_project = nil
when 'tree'
current_project = context.root.self_and_descendants
when 'hierarchy'
current_project = context.hierarchy
when 'descendants'
current_project = context.self_and_descendants
else
current_project = nil
end
self.class.allowed_target_projects(user, current_project)
end
(2-2/3)