Patch #32109
Obey sub-task sharing settings on new issue creation
Status: | New | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Issues | |||
Target version: | - |
Description
There have been previous efforts to improve sub-task management, but they lack support for cross-project sharing setting.
Below is a patch which has been tested manually. Some extra test case are desired, but I would be unable to help more unfortunately.
Index: app/models/issue.rb
===================================================================
--- app/models/issue.rb (revision 18330)
+++ app/models/issue.rb (working copy)
@@ -1509,7 +1509,18 @@
# 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
+ 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
elsif new_record?
current_project = nil
else
Related issues
History
#1
Updated by Andrey Galkin over 3 years ago
- File obey-subtask-settings.patch
added
Attaching the patch as file as description got screwed.
#2
Updated by Go MAEDA over 3 years ago
- Description updated (diff)
#3
Updated by Vincent VIGNOLLE almost 2 years ago
- File obey-subtask-settings-411.patch
added
Here is the adaptation to 4.1.1 of this very useful patch.
It applies the settings of the sub-task to a new issue ( « Allow cross-project issue relations » ).
#4
Updated by Vincent VIGNOLLE almost 2 years ago
- File obey-subtask-settings-411.patch
added
Here is the adaptation to 4.1.1 of this very useful patch.
It applies the settings of the sub-task to a new issue ( « Allow cross-project issue relations » ).
#5
Updated by Go MAEDA over 1 year ago
- Related to Feature #12704: Allow selecting subprojects on new issue form added
#6
Updated by Go MAEDA over 1 year ago
I think this issue was fixed in Redmine 4.2 by #33419. Could you test with Redmine 4.2?
#7
Updated by Vincent VIGNOLLE about 1 year ago
Yes, I confirm !