Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8345 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8f23043851
commit
20ead6d8f7
|
@ -936,12 +936,13 @@ class Issue < ActiveRecord::Base
|
||||||
}
|
}
|
||||||
# custom fields changes
|
# custom fields changes
|
||||||
custom_values.each {|c|
|
custom_values.each {|c|
|
||||||
next if (@custom_values_before_change[c.custom_field_id]==c.value ||
|
before = @custom_values_before_change[c.custom_field_id]
|
||||||
(@custom_values_before_change[c.custom_field_id].blank? && c.value.blank?))
|
after = c.value
|
||||||
|
next if before == after || (before.blank? && after.blank?)
|
||||||
@current_journal.details << JournalDetail.new(:property => 'cf',
|
@current_journal.details << JournalDetail.new(:property => 'cf',
|
||||||
:prop_key => c.custom_field_id,
|
:prop_key => c.custom_field_id,
|
||||||
:old_value => @custom_values_before_change[c.custom_field_id],
|
:old_value => before,
|
||||||
:value => c.value)
|
:value => after)
|
||||||
}
|
}
|
||||||
@current_journal.save
|
@current_journal.save
|
||||||
# reset current journal
|
# reset current journal
|
||||||
|
|
Loading…
Reference in New Issue