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.
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18516
dcc99617-32d9-48b4-a31d-
7c20da2025e4
$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;