From a078517c4619399e4b06dcc2f65dfb360c137ccb Mon Sep 17 00:00:00 2001 From: baarkerlounger <5101747+baarkerlounger@users.noreply.github.com> Date: Wed, 11 May 2022 11:11:09 +0100 Subject: [PATCH] Sort case log index table by most recent by default (#567) --- 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