From cc410c0bb35bdae5f7c4a1e3c9ed0adb6f05147f Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Tue, 29 Aug 2023 19:14:56 +0000 Subject: [PATCH] Bug 34639: Restore order_by To test: 1. prove t/db_dependent/Koha/Item.t 2. Observe success --- Koha/Schema/Result/Item.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index 43f0f9fc24..55b84c3052 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -984,6 +984,9 @@ __PACKAGE__->has_many( "$args->{foreign_alias}.datecancelled" => undef, } }, + { + order_by => [ { -desc => 'datesent' }, { -asc => 'daterequested' } ] + } ); # Relationship with bundled items -- 2.34.1