Fix query filters

pull/6827/head
Oliver Günther 8 years ago
parent 3a2546abd0
commit 6f279426bb
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  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