Defect #25049

Issues which are assigned to group are not listed in reminders if 'users' parameter is specified

Added by Go MAEDA over 3 years ago. Updated about 3 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email notifications
Target version:-
Resolution: Affected version:3.2.5

Description

Assume the following situation:

  • John (id: 2) and Dave (id: 3) belong to a group.
  • The group is an assignee of an issue which subject is "Assigned to group".

If you run "rake redmine:send_reminders users=2", the issue "Assigned to group" should be listed in the reminder which John receives. But in fact it is not.

This is a test code to catch the problem:

Index: test/unit/mailer_test.rb
===================================================================
--- test/unit/mailer_test.rb    (revision 16332)
+++ test/unit/mailer_test.rb    (working copy)
@@ -645,11 +645,18 @@
       ActionMailer::Base.deliveries.each do |mail|
         assert_mail_body_match 'Assigned to group', mail
       end
+
+      ActionMailer::Base.deliveries.clear
+
+      Mailer.reminders(:days => 7, :users => ['2'])
+      assert_equal 1, ActionMailer::Base.deliveries.size
+      assert_equal %w(jsmith@somenet.foo), ActionMailer::Base.deliveries.map(&:bcc).flatten.sort
+      assert_mail_body_match 'Assigned to group', ActionMailer::Base.deliveries.first
     end
   end

   def test_reminders_with_version_option
-    with_settings :default_language => 'en' do
+    with_settings :default_language => 'en' do
       version = Version.generate!(:name => 'Acme', :project_id => 1)
       Issue.generate!(:assigned_to => User.find(2), :due_date => 5.days.from_now)
       Issue.generate!(:assigned_to => User.find(3), :due_date => 5.days.from_now, :fixed_version => version)

Related issues

Blocks Redmine - Feature #2477: mail reminder for watchers New 2009-01-09

History

#1 Updated by Go MAEDA over 3 years ago

#2 Updated by Toshi MARUYAMA about 3 years ago

  • Description updated (diff)

Also available in: Atom PDF