summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-05-27 07:40:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-05-27 07:40:24 +0000
commitd54ede781b60207dc9163e5953c04a52bac82c42 (patch)
tree05893ddbc91890b624c12e597bdf234ee8702bfc /app/models
parent313706276c2478d03bd6d22c9495f3bbef292ec8 (diff)
downloadredmine-d54ede781b60207dc9163e5953c04a52bac82c42.tar.gz
redmine-d54ede781b60207dc9163e5953c04a52bac82c42.zip
Merged r16557 (#25713).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16567 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/mailer.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 0e51a095d..95a76a23e 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -362,7 +362,10 @@ class Mailer < ActionMailer::Base
end
issues_by_assignee.each do |assignee, issues|
- reminder(assignee, issues, days).deliver if assignee.is_a?(User) && assignee.active?
+ if assignee.is_a?(User) && assignee.active? && issues.present?
+ visible_issues = issues.select {|i| i.visible?(assignee)}
+ reminder(assignee, visible_issues, days).deliver if visible_issues.present?
+ end
end
end