]> source.dussan.org Git - redmine.git/commitdiff
Sort journals by created_on then id (#14881).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 27 Jun 2015 07:11:41 +0000 (07:11 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 27 Jun 2015 07:11:41 +0000 (07:11 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@14374 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

index 2f7aa5315a759521a9c7e0856812ba38f1baf2b9..80f02409aaae032841d9c76f60e61de00dad0e37 100644 (file)
@@ -96,7 +96,7 @@ class IssuesController < ApplicationController
   def show
     @journals = @issue.journals.includes(:user, :details).
                     references(:user, :details).
-                    reorder("#{Journal.table_name}.id ASC").to_a
+                    reorder(:created_on, :id).to_a
     @journals.each_with_index {|j,i| j.indice = i+1}
     @journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
     Journal.preload_journals_details_custom_fields(@journals)