Bugzilla – Attachment 174990 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.39 KB, created by
PTFS Europe Sandboxes
on 2024-11-26 16:18:41 UTC
(
hide
)
Description:
Bug 14907: Sort item search by cn_sort when sorting by callnumber
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2024-11-26 16:18:41 UTC
Size:
1.39 KB
patch
obsolete
>From ef3ac7b5b1f3ee67ff82ca581bbb81f35481b9dd 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) > >Signed-off-by: Gretchen Maxeiner <maxeinerGL@gcc.edu> >Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com> >--- > C4/Items.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 920b6c77f3..82882dccf8 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
| 174990