LP#813151 Copy Location sort order in Advanced Search
authorMichael Peters <mrpeters@library.in.gov>
Thu, 21 Jul 2011 15:21:34 +0000 (11:21 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Mon, 25 Jul 2011 20:37:03 +0000 (16:37 -0400)
This patch addresses the unintuitive copy location sort order in
Advanced Search when searching at a specific branch. Thanks to
Dan Wells for the code suggestion which changes the order in the listbox
to alphabetical sort by asset.copy_location.name.
Tested, and confirmed working in 2.0.4 test and production environments.

Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>

Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CopyLocations.pm

index d7f0773..bc4f2c1 100644 (file)
@@ -33,6 +33,7 @@ sub cl_retrieve_all {
        }
 
     my $second_cstore_arg = {"no_i18n" => scalar($no_i18n)};
+       $second_cstore_arg->{"order_by"} = {"acpl" => "name"};
     if ($flesh_owning_lib) {
         $second_cstore_arg->{"flesh"} = 1;
         $second_cstore_arg->{"flesh_fields"} = {"acpl" => ["owning_lib"]};