プロジェクト

全般

プロフィール

Vote #80338

未完了

Obey sub-task sharing settings on new issue creation

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
0
issue_org_id:
32109
author_id:
322398
assigned_to_id:
0
comments:
7
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

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

journals

Attaching the patch as file as description got screwed.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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 » ).
--------------------------------------------------------------------------------
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 » ).
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I think this issue was fixed in Redmine 4.2 by #33419. Could you test with Redmine 4.2?
--------------------------------------------------------------------------------
Yes, I confirm !
--------------------------------------------------------------------------------


related_issues

relates,Closed,12704,Allow selecting subprojects on new issue form

Admin Redmine さんが約2年前に更新

  • カテゴリIssues_2 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0