Fixed: Custom fields of type version not proper handled in receiving e-mails (#11571).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10157 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
3f1c35b71e
commit
1949f61d0c
3 files changed
+24
-2
No files matched your search
@@ -126,6 +126,16 @@ class CustomField < ActiveRecord::Base
|
||||
casted
|
||||
end
|
||||
|
||||
def value_from_keyword(keyword, customized)
|
||||
possible_values_options = possible_values_options(customized)
|
||||
if possible_values_options.present?
|
||||
keyword = keyword.to_s.downcase
|
||||
possible_values_options.detect {|text, id| text.downcase == keyword}.try(:last)
|
||||
else
|
||||
keyword
|
||||
end
|
||||
end
|
||||
|
||||
# Returns a ORDER BY clause that can used to sort customized
|
||||
# objects by their value of the custom field.
|
||||
# Returns nil if the custom field can not be used for sorting.
|
||||
|
||||
Reference in new issue
Block a user