Bugzilla – Attachment 141759 Details for
Bug 31756
Biblionumber not numerically sorting natively when using Zebra
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31756: Use native Zebra numeric sort for biblionumber
Bug-31756-Use-native-Zebra-numeric-sort-for-biblio.patch (text/plain), 1.45 KB, created by
David Cook
on 2022-10-13 00:07:52 UTC
(
hide
)
Description:
Bug 31756: Use native Zebra numeric sort for biblionumber
Filename:
MIME Type:
Creator:
David Cook
Created:
2022-10-13 00:07:52 UTC
Size:
1.45 KB
patch
obsolete
>From 285241b38f88e3a2abc459490cd26dad3b74ae10 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >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 <i "; >+ $sort_by .= "1=12,4=109 <i "; > } > elsif ( $sort eq "biblionumber_za" || $sort eq "biblionumber_dsc" ) { >- $sort_by .= "1=12 >i "; >+ $sort_by .= "1=12,4=109 >i "; > } > else { > warn "Ignoring unrecognized sort '$sort' requested" if $sort_by; >-- >2.35.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31756
: 141759 |
141760
|
141761