diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 11340375c4..60d1b21508 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -445,6 +445,7 @@ class DueIssuesReminder issues_by_assignee = WorkPackage.includes(:status, :assigned_to, :project, :type) .where(s.conditions) + .references(:projects) .group_by(&:assigned_to) issues_by_assignee.each do |assignee, issues| UserMailer.reminder_mail(assignee, issues, @days).deliver if assignee && assignee.active?