summaryrefslogtreecommitdiffstats
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-24 09:53:10 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-24 09:53:10 +0000
commit20ead6d8f73db890be784e66399035dfc427b800 (patch)
treeb5c70901747346fbd00b91c8481ba995aa359891 /app/models/issue.rb
parent8f23043851708a97807f05bbd0f936ad35f65366 (diff)
downloadredmine-20ead6d8f73db890be784e66399035dfc427b800.tar.gz
redmine-20ead6d8f73db890be784e66399035dfc427b800.zip
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8345 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 8e62f135e..c46d035eb 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -936,12 +936,13 @@ 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?))
+ before = @custom_values_before_change[c.custom_field_id]
+ after = c.value
+ next if before == after || (before.blank? && after.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)
+ :old_value => before,
+ :value => after)
}
@current_journal.save
# reset current journal