From ee46c3570ec5f3948a94adedfdefd734822f95af Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 25 Apr 2020 08:01:59 +0000 Subject: Use scope assignable_watchers (#4511). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@19726 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins') 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 bb04eb7f0..6b16e18a5 100644 --- a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb +++ b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb @@ -31,7 +31,7 @@ module Redmine # Returns an array of users that are proposed as watchers def addable_watcher_users - users = self.project.principals.where(:users => {:type => ['User', 'Group']}).sort - self.watcher_users + users = self.project.principals.assignable_watchers.sort - self.watcher_users if respond_to?(:visible?) users.reject! {|user| user.is_a?(User) && !visible?(user)} end -- cgit v1.2.3