Content
View differences
Updated by Peter Franken almost 9 years ago
**Steps to reproduce:**
`/usr/bin/openproject run bundle exec rake redmine:send_reminders days=2 RAILS_ENV="production"`
(from https://community.openproject.com/projects/openproject/work\_packages/7693/activity\#activity-9)
**Actual Behavior**
Fails, if an assignee is not a user (=it is a group)
**Expected Behavior**
Should send emails to
1. a user, if the user is the assignee
2. to all members of a group, if the group is the assignee
**Workaround:**
Send mails only to users (not groups)
See `/opt/openproject/app/mailers/user_mailer.rb:474 class DueIssuesReminder`
Replace line 474
`UserMailer.reminder_mail(assignee, issues, `days).deliver\_now if assignee && assignee.active?@
with
`UserMailer.reminder_mail(assignee, issues, `days).deliver\_now if assignee && assignee.is\_a?(User) && assignee.active?@
This stops failing, but the members of a group are not addressed.
`/usr/bin/openproject run bundle exec rake redmine:send_reminders days=2 RAILS_ENV="production"`
(from https://community.openproject.com/projects/openproject/work\_packages/7693/activity\#activity-9)
**Actual Behavior**
Fails, if an assignee is not a user (=it is a group)
**Expected Behavior**
Should send emails to
1. a user, if the user is the assignee
2. to all members of a group, if the group is the assignee
**Workaround:**
Send mails only to users (not groups)
See `/opt/openproject/app/mailers/user_mailer.rb:474 class DueIssuesReminder`
Replace line 474
`UserMailer.reminder_mail(assignee, issues, `days).deliver\_now if assignee && assignee.active?@
with
`UserMailer.reminder_mail(assignee, issues, `days).deliver\_now if assignee && assignee.is\_a?(User) && assignee.active?@
This stops failing, but the members of a group are not addressed.