From 27ebd8430920886c36abf163162649ee698dcca4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 2 Mar 2017 18:16:54 +0000 Subject: [PATCH] Priority should always be preloaded as it's used to render issue links. git-svn-id: http://svn.redmine.org/redmine/trunk@16346 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_query.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 60ba44282..458eea00a 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -276,6 +276,7 @@ class IssueQuery < Query scope = Issue.visible. joins(:status, :project). + preload(:priority). where(statement). includes(([:status, :project] + (options[:include] || [])).uniq). where(options[:conditions]). @@ -284,7 +285,7 @@ class IssueQuery < Query limit(options[:limit]). offset(options[:offset]) - scope = scope.preload([:tracker, :priority, :author, :assigned_to, :fixed_version, :category] & columns.map(&:name)) + scope = scope.preload([:tracker, :author, :assigned_to, :fixed_version, :category] & columns.map(&:name)) if has_custom_field_column? scope = scope.preload(:custom_values) end -- 2.39.5