From 118ca2f2ff3c4ccde4bceab9fdc89526f074b6df Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Wed, 11 May 2022 11:00:39 +0100 Subject: [PATCH] Sort case log index table by most recent by default --- app/controllers/case_logs_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/case_logs_controller.rb b/app/controllers/case_logs_controller.rb index 7e8e00560..fa33ad5df 100644 --- a/app/controllers/case_logs_controller.rb +++ b/app/controllers/case_logs_controller.rb @@ -131,6 +131,7 @@ private query = query.public_send("filter_by_#{category}", values, current_user) end end + query = query.order(created_at: :desc) current_user.support? ? query.all.includes(:owning_organisation, :managing_organisation) : query end