diff options
-rw-r--r-- | lib/redmine/field_format.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index d0e2e4d7c..9514a984f 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -578,7 +578,7 @@ module Redmine options = possible_values_options(custom_value.custom_field, custom_value.customized) missing = [custom_value.value_was].flatten.reject(&:blank?) - options.map(&:last) if missing.any? - options += target_class.find_all_by_id(missing.map(&:to_i)).map {|o| [o.to_s, o.id.to_s]} + options += target_class.where(:id => missing.map(&:to_i)).map {|o| [o.to_s, o.id.to_s]} #TODO: use #sort_by! when ruby1.8 support is dropped options = options.sort_by(&:first) end |