Patch #33431 » time_query_performace_v3.patch
| app/models/time_entry_query.rb | ||
|---|---|---|
|
includes(:activity).
|
||
|
references(:activity).
|
||
|
left_join_issue.
|
||
|
where("#{Enumeration.table_name}.project_id = #{TimeEntry.table_name}.project_id" \
|
||
|
" AND #{Enumeration.table_name}.project_id = #{Project.table_name}.id" \
|
||
|
" OR #{Enumeration.table_name}.project_id IS NULL")
|
||
|
where(statement)
|
||
|
end
|
||