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

Fix query filters
pull/6827/head
Oliver Günther 8 years ago committed by GitHub
commit 01914d7dd2
  1. 2
      lib/open_project/costs/engine.rb
  2. 2
      lib/open_project/costs/patches/query_patch.rb
  3. 2
      lib/open_project/costs/work_package_filter.rb

@ -347,7 +347,7 @@ module OpenProject::Costs
end
initializer 'costs.register_query_filter' do
Queries::WorkPackages::FilterRegister.register(OpenProject::Costs::WorkPackageFilter)
Queries::Register.filter Query, OpenProject::Costs::WorkPackageFilter
end
module EagerLoadedCosts

@ -88,8 +88,6 @@ module OpenProject::Costs::Patches::QueryPatch
labor_costs + material_costs
}))
Queries::WorkPackages::Filter.add_filter_type_by_field('cost_object_id', 'list_optional')
end
end

@ -18,7 +18,7 @@
#++
module OpenProject::Costs
class WorkPackageFilter < Queries::WorkPackages::Filter::BaseFilter
class WorkPackageFilter < ::Queries::BaseFilter
def values
CostObject
.where(project_id: project)

Loading…
Cancel
Save