[open-ils-commits] r18518 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Oct 28 11:10:56 EDT 2010


Author: dbs
Date: 2010-10-28 11:10:53 -0400 (Thu, 28 Oct 2010)
New Revision: 18518

Modified:
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
Log:
Backport r18516: Ensure call numbers are returned to the holdings editor in ascending sorted order

James Fournie in https://bugs.launchpad.net/evergreen/+bug/635121 reported
that call numbers were being displayed in the order that they had been
added to the database, rather than in sorted call number label order.

Although I have been unable to reproduce this problem on two different
test systems, the patch he provided for 1.6.1 (which fixes the problem on their
test system) shouldn't hurt other systems.

For sortkey-aware branches, I modified James' patch to take advantage of the
asset.call_number.label_sortkey column and the oils_text_as_bytea() function.


Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm	2010-10-28 15:08:00 UTC (rev 18517)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm	2010-10-28 15:10:53 UTC (rev 18518)
@@ -550,7 +550,9 @@
 	$search_hash->{deleted} = 'f';
 	my $e = new_editor();
 
-	my $vols = $e->search_asset_call_number($search_hash);
+	my $vols = $e->search_asset_call_number([$search_hash, { 'order_by' => {
+		'acn' => 'oils_text_as_bytea(label_sortkey), oils_text_as_bytea(label), id, owning_lib'
+	} } ] );
 
 	my @volumes;
 



More information about the open-ils-commits mailing list