Project

General

Profile

Actions

Defect #33935

closed

Locked users in a group receive notifications when the group is added as a watcher

Defect #33935: Locked users in a group receive notifications when the group is added as a watcher

Added by Yuichi HARADA about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Email notifications
Target version:
-
Resolution:
Fixed
Affected version:

Description

Reproduce by the following step.

  1. Add the user-A to the group and then lock the user-A.
  2. Add the group to the issue's watcher.
  3. A notification is sent to locked user-A when the issue is updated.

Files

fixed-33935.patch (2.04 KB) fixed-33935.patch Yuichi HARADA, 2020-09-01 02:51

Related issues 1 (0 open — 1 closed)

Related to Redmine - Feature #4511: Allow adding user groups as watchers for issuesClosedGo MAEDAActions

Updated by Yuichi HARADA about 6 years ago Actions #1

The following patch solved the issue.

diff --git a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb
index 6b16e18a5..bb71a2884 100644
--- a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb
+++ b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb
@@ -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?)

Updated by Go MAEDA about 6 years ago Actions #2

  • Subject changed from Send notifications to the locked users of group members to Locked users in a group get notification when the group is added as a watcher
  • Status changed from New to Confirmed

Updated by Go MAEDA about 6 years ago Actions #3

  • Related to Feature #4511: Allow adding user groups as watchers for issues added

Updated by Go MAEDA about 6 years ago Actions #4

  • Subject changed from Locked users in a group get notification when the group is added as a watcher to Locked users in a group receive notifications when the group is added as a watcher
  • Status changed from Confirmed to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch in r19998 as a part of #4511. Thank you.

Actions

Also available in: PDF Atom