summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2025-04-16 06:50:26 +0000
committerGo MAEDA <maeda@farend.jp>2025-04-16 06:50:26 +0000
commit113d7f50a97314ef833debffd260e825f14a94ca (patch)
tree6ad267dc54c7e95772f5668baf4d0576cd95d5fb
parentc3f4d90ad7f6bb7191390d92a8845d84a1b92c71 (diff)
downloadredmine-113d7f50a97314ef833debffd260e825f14a94ca.tar.gz
redmine-113d7f50a97314ef833debffd260e825f14a94ca.zip
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
-rw-r--r--app/controllers/auto_completes_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/auto_completes_controller.rb b/app/controllers/auto_completes_controller.rb
index 2982447e9..77105c8e8 100644
--- a/app/controllers/auto_completes_controller.rb
+++ b/app/controllers/auto_completes_controller.rb
@@ -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?