@@ -142,6 +142,9 class Issue < ActiveRecord::Base | |||||
142 | end |
|
142 | end | |
143 |
|
143 | |||
144 | def after_save |
|
144 | def after_save | |
|
145 | # Reload is needed in order to get the right status | |||
|
146 | reload | |||
|
147 | ||||
145 | # Update start/due dates of following issues |
|
148 | # Update start/due dates of following issues | |
146 | relations_from.each(&:set_issue_to_dates) |
|
149 | relations_from.each(&:set_issue_to_dates) | |
147 |
|
150 | |||
@@ -165,6 +168,7 class Issue < ActiveRecord::Base | |||||
165 | def init_journal(user, notes = "") |
|
168 | def init_journal(user, notes = "") | |
166 | @current_journal ||= Journal.new(:journalized => self, :user => user, :notes => notes) |
|
169 | @current_journal ||= Journal.new(:journalized => self, :user => user, :notes => notes) | |
167 | @issue_before_change = self.clone |
|
170 | @issue_before_change = self.clone | |
|
171 | @issue_before_change.status = self.status | |||
168 | @custom_values_before_change = {} |
|
172 | @custom_values_before_change = {} | |
169 | self.custom_values.each {|c| @custom_values_before_change.store c.custom_field_id, c.value } |
|
173 | self.custom_values.each {|c| @custom_values_before_change.store c.custom_field_id, c.value } | |
170 | @current_journal |
|
174 | @current_journal |
@@ -31,7 +31,6 class Mailer < ActionMailer::Base | |||||
31 |
|
31 | |||
32 | def issue_edit(journal) |
|
32 | def issue_edit(journal) | |
33 | issue = journal.journalized |
|
33 | issue = journal.journalized | |
34 | issue.reload |
|
|||
35 | recipients issue.recipients |
|
34 | recipients issue.recipients | |
36 | # Watchers in cc |
|
35 | # Watchers in cc | |
37 | cc(issue.watcher_recipients - @recipients) |
|
36 | cc(issue.watcher_recipients - @recipients) |
General Comments 0
You need to be logged in to leave comments.
Login now