From 285241b38f88e3a2abc459490cd26dad3b74ae10 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 13 Oct 2022 10:57:43 +1100 Subject: [PATCH] Bug 31756: Use native Zebra numeric sort for biblionumber This patch uses native Zebra numeric sort for biblionumber to provide ascending and descending biblionumber sort in Koha. To test: 1. Apply patches 2. koha-plack --restart kohadev 3. Browse to: http://localhost:8081/cgi-bin/koha/catalogue/search.pl? idx=kw&q=a&sort_by=biblionumber_dsc&count=20 4. Confirm records sorted correctly 5. Browse to http://localhost:8081/cgi-bin/koha/catalogue/search.pl? idx=kw&q=a&sort_by=biblionumber_asc&count=20 6. Confirm records sorted correctly --- C4/Search.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 14935ab731..376fead6c2 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -391,10 +391,10 @@ sub getRecords { $sort_by .= "1=4 >i "; } elsif ( $sort eq "biblionumber_az" || $sort eq "biblionumber_asc" ) { - $sort_by .= "1=12