Can-not-import-key-value-list-custom-field.patch

Haihan Ji, 2016-05-27 14:01

Download (510 Bytes)

View differences:

lib/redmine/field_format.rb
715 715
      end
716 716

  
717 717
      def value_from_keyword(custom_field, keyword, object)
718
        value = custom_field.enumerations.where("LOWER(name) LIKE LOWER(?)", keyword)
718
        value = custom_field.enumerations.where("LOWER(name) LIKE LOWER(?)", keyword).first
719 719
        value ? value.id : nil
720 720
      end
721 721
    end