Project

General

Profile

Patch #18440 ยป sort_journals.diff

Vincent Robert, 2014-11-25 14:44

View differences:

app/controllers/issues_controller.rb
105 105
  def show
106 106
    @journals = @issue.journals.includes(:user, :details).
107 107
                    references(:user, :details).
108
                    reorder("#{Journal.table_name}.id ASC").to_a
108
                    reorder("#{Journal.table_name}.created_on ASC").to_a
109 109
    @journals.each_with_index {|j,i| j.indice = i+1}
110 110
    @journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
111 111
    Journal.preload_journals_details_custom_fields(@journals)
    (1-1/1)