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

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 20cba0d295)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3d751067b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2018-10-22 17:02:51 -03:00 committed by Fridolin Somers
parent a4dc8b7c8d
commit d337d5efd3
2 changed files with 2 additions and 2 deletions

View File

@ -242,7 +242,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(
{},
{

View File

@ -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(
{},
{