Defect #26627

Editing issues no longer sends notifications to previous assignee

Added by Rocket Lee 4 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:3.4.3
Resolution:Fixed Affected version:3.4.2

Description

Editing issues no longer sends notifications to previous assignee.

This is happening because of the change made in #25794, which changed app/models/journal.rb from after_create :send_notification to after_commit :send_notification, :on => :create. This is causing clear_assigned_to_was() in app/models/issue.rb to be called before the notifications are being generated and so the previous assignee variable is already set to nil when it's time to send the notification. after_commit runs too late.

I know this affects up through 3.4.2, but I don't know how it affects the new master.

Here's the specific line change: https://github.com/redmine/redmine/commit/9439cae70fab58b8cafdd753aa83135d4279345d#diff-b3b2ca7a3d44a3146792e51535d4acd5


Related issues

Related to Redmine - Defect #25794: Mass-deleted attachments are not represented correctly in... Closed
Duplicated by Redmine - Defect #26628: When assignee change, previous assignee did't notified Closed

Associated revisions

Revision 17002
Added by Jean-Philippe Lang about 1 month ago

Editing issues no longer sends notifications to previous assignee (#26627).

History

#1 Updated by Toshi MARUYAMA 4 months ago

  • Related to Defect #25794: Mass-deleted attachments are not represented correctly in email notifications added

#2 Updated by Toshi MARUYAMA 4 months ago

  • Status changed from New to Confirmed
  • Target version set to 3.4.3

Confirmed.
I don't know why "test_update_should_notify_previous_assignee" does not catch.
source:tags/3.4.2/test/unit/issue_test.rb#L2441

#3 Updated by Go MAEDA 4 months ago

  • Duplicated by Defect #26628: When assignee change, previous assignee did't notified added

#4 Updated by Jean-Philippe Lang about 1 month ago

  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r17002.

#5 Updated by Jean-Philippe Lang about 1 month ago

  • Status changed from Confirmed to Closed

#6 Updated by Rocket Lee about 1 month ago

Thank you!

Also available in: Atom PDF