From 03f87b7715079226f7536b57d9fa4c8875ae26ad Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 21 Nov 2022 19:12:46 +0000 Subject: [PATCH] Bug 13976: Sort popularity numerically in Zebra Content-Type: text/plain; charset=utf-8 To test: 1 - Create a new template at Tools->Marc modification template 2 - Add action: Copy 999$c to 942$0 3 - Create a report: SELECT biblionuber FROM biblios 4 - Run report, show all, do a batch modification to all records using template above 5 - Search for 'a' (make sure you are using Zebra) 6 - Sort by popularity 7 - Note records are sorted wrong 8 - Apply patch 9 - Restart all 10 - Reload search results 11 - Success! Sorted correctly Signed-off-by: Anke Signed-off-by: Marcel de Rooy --- C4/Search.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 9a87f15347..5985db2edb 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -364,10 +364,10 @@ sub getRecords { $sort_by .= "1=1003 >i "; } elsif ( $sort eq "popularity_asc" ) { - $sort_by .= "1=9003