summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-05 19:56:33 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-05 19:56:33 +0000
commit1b2e80545a20f3dc19225991536f1c8d85c74665 (patch)
treea2f2225ecd14c7f21e3f0987274a85f1b0fb9afe /app
parent8dcc041244822db6d994bc04dea94306216c4ee0 (diff)
downloadredmine-1b2e80545a20f3dc19225991536f1c8d85c74665.tar.gz
redmine-1b2e80545a20f3dc19225991536f1c8d85c74665.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/models/issue.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index b6eda1767..827c6f70e 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -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