Patch #32109 » obey-subtask-settings.patch
| app/models/issue.rb (working copy) | ||
|---|---|---|
| 1509 | 1509 | # Returns a scope of projects that user can assign the issue to | 
| 1510 | 1510 | def allowed_target_projects(user=User.current, context=nil) | 
| 1511 | 1511 | if new_record? && context.is_a?(Project) && !copy? | 
| 1512 | current_project = context.self_and_descendants | |
| 1512 | case Setting.cross_project_subtasks | |
| 1513 | when 'system' | |
| 1514 | current_project = nil | |
| 1515 | when 'tree' | |
| 1516 | current_project = context.root.self_and_descendants | |
| 1517 | when 'hierarchy' | |
| 1518 | current_project = context.hierarchy | |
| 1519 | when 'descendants' | |
| 1520 | current_project = context.self_and_descendants | |
| 1521 | else | |
| 1522 | current_project = nil | |
| 1523 | end | |
| 1513 | 1524 | elsif new_record? | 
| 1514 | 1525 | current_project = nil | 
| 1515 | 1526 | else |