]> source.dussan.org Git - redmine.git/commitdiff
Priority should always be preloaded as it's used to render issue links.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 2 Mar 2017 18:16:54 +0000 (18:16 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 2 Mar 2017 18:16:54 +0000 (18:16 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16346 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue_query.rb

index 60ba44282f54c92b820fcdb4ace29b59f63bb136..458eea00a0b97edbd53ca574ab298b021bfb2e7c 100644 (file)
@@ -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