summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-02 18:16:54 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-02 18:16:54 +0000
commit27ebd8430920886c36abf163162649ee698dcca4 (patch)
treea5cb697ce591c1b7c70763841bd3541567624be0 /app
parent7d04dca69777b3accda9cac5d8e5707112442d3a (diff)
downloadredmine-27ebd8430920886c36abf163162649ee698dcca4.tar.gz
redmine-27ebd8430920886c36abf163162649ee698dcca4.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/models/issue_query.rb3
1 files changed, 2 insertions, 1 deletions
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