Merge pull request #237 from finnlabs/fix/query-filters

Fix work package filter query
pull/6827/head
Oliver Günther 8 years ago committed by GitHub
commit d23026d383
  1. 2
      lib/open_project/backlogs/engine.rb
  2. 2
      lib/open_project/backlogs/patches/query_patch.rb
  3. 2
      lib/open_project/backlogs/work_package_filter.rb

@ -248,7 +248,7 @@ module OpenProject::Backlogs
end
initializer 'backlogs.register_query_filter' do
Queries::WorkPackages::FilterRegister.register(OpenProject::Backlogs::WorkPackageFilter)
Queries::Register.filter Query, OpenProject::Backlogs::WorkPackageFilter
end
end
end

@ -47,8 +47,6 @@ module OpenProject::Backlogs::Patches::QueryPatch
sortable: "#{WorkPackage.table_name}.remaining_hours",
summable: true))
Queries::WorkPackages::Filter.add_filter_type_by_field('backlogs_work_package_type', 'list')
alias_method_chain :sql_for_field, :backlogs_work_package_type
end
end

@ -37,7 +37,7 @@ require 'story'
require 'task'
module OpenProject::Backlogs
class WorkPackageFilter < Queries::WorkPackages::Filter::BaseFilter
class WorkPackageFilter < ::Queries::BaseFilter
def values
[[I18n.t(:story, scope: [:backlogs]), 'story'],
[I18n.t(:task, scope: [:backlogs]), 'task'],

Loading…
Cancel
Save