Bug 13976: Sort popularity numerically in Zebra

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 <anke.bruns@gwdg.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 45cea7c7ba)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit feea08b03c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9fb9e29c1e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Nick Clemens 2022-11-21 19:12:46 +00:00 committed by Arthur Suzuki
parent 0b18e0b07e
commit c4ccac2bc3
1 changed files with 2 additions and 2 deletions

View File

@ -361,10 +361,10 @@ sub getRecords {
$sort_by .= "1=1003 >i ";
}
elsif ( $sort eq "popularity_asc" ) {
$sort_by .= "1=9003 <i ";
$sort_by .= "1=9003,4=109 <i ";
}
elsif ( $sort eq "popularity_dsc" ) {
$sort_by .= "1=9003 >i ";
$sort_by .= "1=9003,4=109 >i ";
}
elsif ( $sort eq "call_number_asc" ) {
$sort_by .= "1=8007 <i ";