diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-09-23 08:25:25 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-09-23 08:25:25 +0000 |
commit | e856c9f879f15f31317ddfcf35042e799b90f783 (patch) | |
tree | 7101fb598e5f2ef9aebd519bd50cf6e1fe66b30c /app/models/custom_value.rb | |
parent | 55ee0b8f7f5626197e5a3bd919b0cd56276a632e (diff) | |
download | redmine-e856c9f879f15f31317ddfcf35042e799b90f783.tar.gz redmine-e856c9f879f15f31317ddfcf35042e799b90f783.zip |
Fixed that issue details page shows default values for custom fields that aren't actually set (#25726).
git-svn-id: http://svn.redmine.org/redmine/trunk@17499 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_value.rb')
-rw-r--r-- | app/models/custom_value.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/custom_value.rb b/app/models/custom_value.rb index dc511c0d7..734c76b22 100644 --- a/app/models/custom_value.rb +++ b/app/models/custom_value.rb @@ -23,7 +23,7 @@ class CustomValue < ActiveRecord::Base def initialize(attributes=nil, *args) super - if new_record? && custom_field && !attributes.key?(:value) + if new_record? && custom_field && !attributes.key?(:value) && (customized.nil? || customized.set_custom_field_default?(self)) self.value ||= custom_field.default_value end end |