From c6e826502a36ed642fa1bf779586c9c95ced5e39 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 10 May 2015 07:22:19 +0000 Subject: [PATCH] Merged r14239 and r14240 (#19706). git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14250 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 2 +- app/helpers/issues_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 8bc326eaa..4525aa390 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -103,7 +103,7 @@ class IssuesController < ApplicationController @journals.select! {|journal| journal.notes? || journal.visible_details.any?} @journals.reverse! if User.current.wants_comments_in_reverse_order? - @changesets = @issue.changesets.visible.to_a + @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? } diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 8e951596c..853051e2d 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -98,7 +98,7 @@ module IssuesHelper def render_descendants_tree(issue) s = '
' - 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', -- 2.39.5