Actions
Patch #32109
openObey sub-task sharing settings on new issue creation
Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
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
Files
Related issues
Updated by Andrey Galkin about 5 years ago
Attaching the patch as file as description got screwed.
Updated by Anonymous over 3 years ago
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 » ).
Updated by Anonymous over 3 years ago
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 » ).
Updated by Go MAEDA over 3 years ago
- Related to Feature #12704: Allow selecting subprojects on new issue form added
Updated by Go MAEDA over 3 years ago
I think this issue was fixed in Redmine 4.2 by #33419. Could you test with Redmine 4.2?
Actions