Commit 1b2e8054 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

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
parent 8dcc0412
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment