mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 07:46:17 +01:00
Optimize autocomplete issue listing triggered by typing "##" by eager loading trackers (#42574).
Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@23660 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -26,7 +26,7 @@ class AutoCompletesController < ApplicationController
|
||||
status = params[:status].to_s
|
||||
issue_id = params[:issue_id].to_s
|
||||
|
||||
scope = Issue.cross_project_scope(@project, params[:scope]).visible
|
||||
scope = Issue.cross_project_scope(@project, params[:scope]).includes(:tracker).visible
|
||||
scope = scope.open(status == 'o') if status.present?
|
||||
scope = scope.where.not(:id => issue_id.to_i) if issue_id.present?
|
||||
if q.present?
|
||||
|
||||
Reference in New Issue
Block a user