Bugzilla – Attachment 174794 Details for
Bug 14907
Item search: Call Numbers in Item search results are ordered alphabetically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14907: Sort item search by cn_sort when sorting by callnumber
Bug-14907-Sort-item-search-by-cnsort-when-sorting-.patch (text/plain), 1.28 KB, created by
Nick Clemens (kidclamp)
on 2024-11-19 15:42:11 UTC
(
hide
)
Description:
Bug 14907: Sort item search by cn_sort when sorting by callnumber
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-11-19 15:42:11 UTC
Size:
1.28 KB
patch
obsolete
>From 4679db108e9ae192677034f7abb7dceb570fcca4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 19 Nov 2024 14:49:14 +0000 >Subject: [PATCH] Bug 14907: Sort item search by cn_sort when sorting by > callnumber > >This patch simply intercepts a call to sort by callnumber and changes it to cn_sort > >To test: >1 - Add three items: > barcode TEST1 callnumnber D1015.B4 1965 > barcode TEST2 callnumnber D102.D3 1930 > barcode TEST3 callnumnber D101.2.A8 1951 >2 - Go to item search >3 - barcode is 'TEST%' >4 - Sort the results by callnumber >5 - order is TEST3,TEST1,TEST2 (or reversed depending on sort direction) >6 - Apply patch, restart_all >7 - sort again >8 - order is TEST3,TEST2,TEST1 (or reversed depending on sort direction) >--- > C4/Items.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 920b6c77f3d..82882dccf85 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1238,6 +1238,7 @@ sub SearchItems { > } else { > my $sortby = (0 < grep {$params->{sortby} eq $_} @columns) > ? $params->{sortby} : 'itemnumber'; >+ $sortby = 'cn_sort' if $sortby eq 'itemcallnumber'; > my $sortorder = (uc($params->{sortorder}) eq 'ASC') ? 'ASC' : 'DESC'; > $query .= qq{ ORDER BY $sortby $sortorder }; > } >-- >2.39.5
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 14907
:
174793
|
174794
|
174861
|
174862