|
|
|
@ -87,8 +87,12 @@ class ::Query::Results |
|
|
|
|
includes = ([:status, :project] + |
|
|
|
|
includes_for_columns(query.involved_columns) + (options[:include] || [])).uniq |
|
|
|
|
|
|
|
|
|
# A 'distinct' is added by the visible scope which is not necessary for |
|
|
|
|
# filtering the work packages and which might conflict with ordering in |
|
|
|
|
# mysql. |
|
|
|
|
WorkPackage |
|
|
|
|
.visible |
|
|
|
|
.distinct(false) |
|
|
|
|
.where(::Query.merge_conditions(query.statement, options[:conditions])) |
|
|
|
|
.includes(includes) |
|
|
|
|
.joins((query.group_by_column ? query.group_by_column.join : nil)) |
|
|
|
|