Project

General

Profile

Actions

Patch #12659

closed

Broken dirty_tracking inside a after_save callback for the Issue model due to reload in Mailer

Added by Vladimir Kiselev about 12 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

.reload not just gives us current record from database, but also resets *_changed? .changes and etc. in all later methods from callback chain for the reloaded item as a side-effect.
Since there are many plugins which rely on callbacks and sometimes dirty-tracking, this is a problem.
For now, there is a workaround - we can save .changed data in before_save callback. But i think it is better to just isolate the issue record in mailer.


Files

patch.diff (2.08 KB) patch.diff Vladimir Kiselev, 2012-12-20 16:44
Actions #1

Updated by Vladimir Kiselev about 12 years ago

based on 2.2.0

Actions #2

Updated by Go MAEDA almost 6 years ago

  • Status changed from New to Closed

The code of email notification was drastically rewritten for #26791 and the code to patch was removed in r17583.

Actions

Also available in: Atom PDF