From: Jean-Philippe Lang Date: Sun, 10 May 2015 07:22:19 +0000 (+0000) Subject: Merged r14239 and r14240 (#19706). X-Git-Tag: 3.0.3~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c6e826502a36ed642fa1bf779586c9c95ced5e39;p=redmine.git Merged r14239 and r14240 (#19706). git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14250 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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',