]> source.dussan.org Git - redmine.git/commitdiff
Merged r14239 and r14240 (#19706).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 May 2015 07:29:40 +0000 (07:29 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 May 2015 07:29:40 +0000 (07:29 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/2.6-stable@14254 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb
app/helpers/issues_helper.rb

index f1fed83b8ec8134d09b59a842eb48add0ac586bb..99e14829b94211bf904c8ba6ba4ece709096379e 100644 (file)
@@ -112,7 +112,7 @@ class IssuesController < ApplicationController
     @journals.reject! {|journal| !journal.notes? && journal.visible_details.empty?}
     @journals.reverse! if User.current.wants_comments_in_reverse_order?
 
-    @changesets = @issue.changesets.visible.all
+    @changesets = @issue.changesets.visible.preload(:repository, :user).to_a
     @changesets.reverse! if User.current.wants_comments_in_reverse_order?
 
     @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
index f3a876c4d0dae01dfb75b1b23219dc7e35240b6f..ab78fe062e6d76c534139425d9016dfb2e8cf697 100644 (file)
@@ -79,7 +79,7 @@ module IssuesHelper
 
   def render_descendants_tree(issue)
     s = '<form><table class="list issues">'
-    issue_list(issue.descendants.visible.sort_by(&:lft)) do |child, level|
+    issue_list(issue.descendants.visible.preload(:status, :priority, :tracker).sort_by(&:lft)) do |child, level|
       css = "issue issue-#{child.id} hascontextmenu"
       css << " idnt idnt-#{level}" if level > 0
       s << content_tag('tr',