Project

General

Profile

Actions

Defect #36368

open

show in assignable user when he/she is not member of that project

Added by salman mp over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

When moving an issue to another project that author of issue is not member of that, in edit form 'author' shown as an assignable user.

This patch can fix the error.

Index: app/models/issue.rb
<+>UTF-8
===================================================================
diff --git a/app/models/issue.rb b/app/models/issue.rb
--- a/app/models/issue.rb    (revision ec859e41d689ee3432113c3bd74ba48d060c9a2f)
+++ b/app/models/issue.rb    (date 1640777418920)
@@ -975,7 +975,7 @@
     return [] if project.nil?

     users = project.assignable_users(tracker).to_a
-    users << author if author && author.active?
+    users << author if author && author.active? && project.users.include?(author)
     if assigned_to_id_was.present? && assignee = Principal.find_by_id(assigned_to_id_was)
       users << assignee
     end


Files

fix_author_assignee.patch (642 Bytes) fix_author_assignee.patch salman mp, 2021-12-29 14:32
fix-assignable_users.patch (717 Bytes) fix-assignable_users.patch salman mp, 2021-12-30 13:10

Related issues

Related to Redmine - Feature #4199: Reassign back to original author from an SCM commitClosed2009-11-12

Actions
Actions

Also available in: Atom PDF