Fixed: custom field displayed as deleted in the issue history even if no value was set.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@706 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-09-05 19:56:33 +00:00
parent 8dcc041244
commit 1b2e80545a
1 changed files with 3 additions and 1 deletions

View File

@ -86,10 +86,12 @@ class Issue < ActiveRecord::Base
}
# custom fields changes
custom_values.each {|c|
next if (@custom_values_before_change[c.custom_field_id]==c.value ||
(@custom_values_before_change[c.custom_field_id].blank? && c.value.blank?))
@current_journal.details << JournalDetail.new(:property => 'cf',
:prop_key => c.custom_field_id,
:old_value => @custom_values_before_change[c.custom_field_id],
:value => c.value) unless @custom_values_before_change[c.custom_field_id]==c.value
:value => c.value)
}
@current_journal.save unless @current_journal.details.empty? and @current_journal.notes.empty?
end