adapt scope building to 4.0

pull/2167/head
Jens Ulferts 10 years ago
parent 581a547e55
commit e39768232a
  1. 11
      app/services/planning_comparison_service.rb

@ -86,16 +86,13 @@ SQL
protected
def self.filtered_work_packages(projects, filter)
work_package_scope = WorkPackage.scoped
.joins(:status)
.joins(:project) # query doesn't provide these joins itself...
.for_projects(projects)
query = Query.new name: 'generated-query'
query.add_filters(filter[:f], filter[:op], filter[:v])
work_package_scope.with_query(query)
.pluck(:id)
WorkPackage.for_projects(projects)
.with_query(query)
.joins(:status, :project)
.pluck(:id)
end
def self.unfiltered_work_packages(projects)

Loading…
Cancel
Save