Bugzilla – Attachment 8689 Details for
Bug 3521
Items table in catalogue/detail.pl and cataloguing/additem.pl is sorted nonsensically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 3521 - Items table in catalogue/detail.pl and cataloguing/additem.pl is sorted nonsensically
Bug-3521---Items-table-in-cataloguedetailpl-and-ca.patch (text/plain), 1.77 KB, created by
Kyle M Hall
on 2012-03-29 13:59:28 UTC
(
hide
)
Description:
Bug 3521 - Items table in catalogue/detail.pl and cataloguing/additem.pl is sorted nonsensically
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-03-29 13:59:28 UTC
Size:
1.77 KB
patch
obsolete
>From 635257b3c7e882747c777700b87922b1f782b5d5 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 29 Mar 2012 09:54:38 -0400 >Subject: [PATCH] Bug 3521 - Items table in catalogue/detail.pl and cataloguing/additem.pl is sorted nonsensically > >Based on patch submitted by Ian Walls > >Items were sorted by branch, then date accessioned, in GetItemsInfo. While this can be >helpful in some circumstances, more often it is useful for items to be sorted first by >their enumchron (volume/issue, if applicable) then by their copy number. This patch changes the >sort on GetItemsInfo to branch, enumcrhon, copynumber then date accessioned. > >As sorting on copynumber will be incorrect based on standard sorting ( e.g. 1, 10, 2, 20 ), >the copynumber is now padded with leading zeros to correct the sorting ( e.g. 01, 02, 10 20 ). >This function appears to be a standard SQL function and not a mysql-ism. I have verfified >that is available in MySQL, Postgres, and Oracle. >--- > C4/Items.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 0b2f99b..ea77211 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1199,7 +1199,7 @@ sub GetItemsInfo { > LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber > LEFT JOIN itemtypes ON itemtypes.itemtype = " > . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); >- $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname,items.dateaccessioned desc" ; >+ $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ; > my $sth = $dbh->prepare($query); > $sth->execute($biblionumber); > my $i = 0; >-- >1.7.2.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 3521
:
5180
|
5182
|
5183
|
7075
|
7076
|
7077
|
7078
|
7079
|
8688
|
8689
|
9520