Bugzilla – Attachment 80990 Details for
Bug 21629
List sort on call number does not use cn_sort
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list
Bug-21629-Use-cnsort-instead-of-itemcallnumber-whe.patch (text/plain), 1.86 KB, created by
Jonathan Druart
on 2018-10-22 20:05:37 UTC
(
hide
)
Description:
Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-10-22 20:05:37 UTC
Size:
1.86 KB
patch
obsolete
>From 2227e59e0c36471254ea09b51e8ca778cd04023f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 22 Oct 2018 17:02:51 -0300 >Subject: [PATCH] Bug 21629: Use cn_sort instead of itemcallnumber when > displaying a list > >DBMS can sort callnumbers correctly using cn_sort. We should use it >showing a list's content. > >Test plan: >- Add items with callnumber to a list >- Display the list >- List the content by callnumbers >=> Confirm that the records are correctly sorted by callnumber >--- > opac/opac-shelves.pl | 2 +- > virtualshelves/shelves.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index 4fc4efbe79..8da67e905f 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -243,7 +243,7 @@ if ( $op eq 'view' ) { > $rows = C4::Context->preference('OPACnumSearchResults') || 20; > $page = ( $query->param('page') ? $query->param('page') : 1 ); > } >- my $order_by = $sortfield eq 'itemcallnumber' ? 'items.itemcallnumber' : $sortfield; >+ my $order_by = $sortfield eq 'itemcallnumber' ? 'items.cn_sort' : $sortfield; > my $contents = $shelf->get_contents->search( > {}, > { >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index 2758720cd0..bd1c0d4654 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -242,7 +242,7 @@ if ( $op eq 'view' ) { > $page = ( $query->param('page') ? $query->param('page') : 1 ); > } > >- my $order_by = $sortfield eq 'itemcallnumber' ? 'items.itemcallnumber' : $sortfield; >+ my $order_by = $sortfield eq 'itemcallnumber' ? 'items.cn_sort' : $sortfield; > my $contents = $shelf->get_contents->search( > {}, > { >-- >2.11.0
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 21629
:
80990
|
81000
|
81292