diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index b06e635e0..ef778865d 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -103,7 +103,8 @@ class IssuesController < ApplicationController @journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id ASC").all @journals.each_with_index {|j,i| j.indice = i+1} @journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project) - @journals.select! {|journal| journal.notes? || journal.visible_details.any?} + # TODO: use #select! when ruby1.8 support is dropped + @journals.reject! {|journal| !journal.notes? && journal.visible_details.empty?} @journals.reverse! if User.current.wants_comments_in_reverse_order? @changesets = @issue.changesets.visible.all