@@ -397,8 +397,7 class Issue < ActiveRecord::Base | |||
|
397 | 397 | |
|
398 | 398 | def init_journal(user, notes = "") |
|
399 | 399 | @current_journal ||= Journal.new(:journalized => self, :user => user, :notes => notes) |
|
400 |
@ |
|
|
401 | @issue_before_change.status = self.status | |
|
400 | @attributes_before_change = attributes.dup | |
|
402 | 401 | @custom_values_before_change = {} |
|
403 | 402 | self.custom_values.each {|c| @custom_values_before_change.store c.custom_field_id, c.value } |
|
404 | 403 | # Make sure updated_on is updated when adding a note. |
@@ -927,13 +926,13 class Issue < ActiveRecord::Base | |||
|
927 | 926 | if @current_journal |
|
928 | 927 | # attributes changes |
|
929 | 928 | (Issue.column_names - %w(id root_id lft rgt lock_version created_on updated_on)).each {|c| |
|
930 |
before = @ |
|
|
929 | before = @attributes_before_change[c] | |
|
931 | 930 | after = send(c) |
|
932 | 931 | next if before == after || (before.blank? && after.blank?) |
|
933 | 932 | @current_journal.details << JournalDetail.new(:property => 'attr', |
|
934 | 933 | :prop_key => c, |
|
935 |
:old_value => |
|
|
936 |
:value => |
|
|
934 | :old_value => before, | |
|
935 | :value => after) | |
|
937 | 936 | } |
|
938 | 937 | # custom fields changes |
|
939 | 938 | custom_values.each {|c| |
General Comments 0
You need to be logged in to leave comments.
Login now