diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-13 09:38:05 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-05-13 09:38:05 +0000 |
commit | 0f09f161f64f4190a52166675ff380a15b72a8bc (patch) | |
tree | b5725f508bd6949eaa5d54e795e4796c03587305 /app | |
parent | 6543d73a64cf1e9ce6c7d5add737fb53b832ecbd (diff) | |
download | redmine-0f09f161f64f4190a52166675ff380a15b72a8bc.tar.gz redmine-0f09f161f64f4190a52166675ff380a15b72a8bc.zip |
Send reminders about visible issues only (#25713).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@16557 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/mailer.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index fe0279240..f6b16b9f2 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -406,7 +406,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 |