]> source.dussan.org Git - redmine.git/commitdiff
Preload issue authors when displayed on the issue list (#16091).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 22 Feb 2014 11:21:05 +0000 (11:21 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 22 Feb 2014 11:21:05 +0000 (11:21 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12911 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue_query.rb

index 9a6d278fe154219308ec861f03ad1e26a8306a9b..bf90f56d1f9e2c242b888bc75327c7822a35eb4d 100644 (file)
@@ -334,6 +334,9 @@ class IssueQuery < Query
       offset(options[:offset])
 
     scope = scope.preload(:custom_values)
+    if has_column?(:author)
+      scope = scope.preload(:author)
+    end
 
     issues = scope.all