Actions
Defect #25049
openIssues which are assigned to group are not listed in reminders if 'users' parameter is specified
Status:
New
Priority:
Normal
Assignee:
-
Category:
Email notifications
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Affected version:
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
Actions