##// END OF EJS Templates
Moves watchers filtering logic to ActsAsWatchable....
Jean-Philippe Lang -
r3054:6610bb6b6cbb
parent child
Show More
@@ -314,13 +314,6 class Issue < ActiveRecord::Base
314 314 notified.collect(&:mail)
315 315 end
316 316
317 # Returns the mail adresses of watchers that should be notified
318 def watcher_recipients
319 notified = watcher_users
320 notified.reject! {|user| !user.active? || !visible?(user)}
321 notified.collect(&:mail)
322 end
323
324 317 # Returns the total number of hours spent on this issue.
325 318 #
326 319 # Example:
@@ -53,7 +53,11 module Redmine
53 53
54 54 # Returns an array of watchers' email addresses
55 55 def watcher_recipients
56 self.watchers.collect { |w| w.user.mail if w.user.active? }.compact
56 notified = watchers.collect(&:user).select(&:active?)
57 if respond_to?(:visible?)
58 notified.reject! {|user| !visible?(user)}
59 end
60 notified.collect(&:mail).compact
57 61 end
58 62
59 63 module ClassMethods
General Comments 0
You need to be logged in to leave comments. Login now