Locked users in a group receive notifications when the group is added as a watcher (#4511, #33935).

Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@19998 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2020-09-01 14:08:45 +00:00
parent 2ee6a7cead
commit b0739821e8
2 changed files with 21 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ module Redmine
def notified_watchers
notified = watcher_users.active.to_a
notified = notified.map {|n| n.is_a?(Group) ? n.users : n}.flatten
notified = notified.map {|n| n.is_a?(Group) ? n.users.active : n}.flatten
notified.uniq!
notified.reject! {|user| user.mail.blank? || user.mail_notification == 'none'}
if respond_to?(:visible?)