diff --git a/lib/redmine_tagging/patches/query_patch.rb b/lib/redmine_tagging/patches/query_patch.rb index 0b7ce0f..db3395f 100755 --- a/lib/redmine_tagging/patches/query_patch.rb +++ b/lib/redmine_tagging/patches/query_patch.rb @@ -37,16 +37,16 @@ def available_tags_filter tags = tags.sort_by { |t| t.name.downcase }.map do |tag| [tag_without_sharp(tag), tag_without_sharp(tag)] end - - { - 'tags' => { - type: :list_optional, - values: tags, - name: l(:field_tags), - order: 21, - field: 'tags' - } + field = 'tags' + options = { + type: :list_optional, + values: tags, + name: l(:field_tags), + order: 21, } + filter = ActiveSupport::OrderedHash.new + filter[field] = QueryFilter.new(field, options) + filter end def sql_for_field_with_tags(field, operator, v, db_table, db_field, is_custom_filter = false)