From: Terran McCanna Date: Wed, 20 Jan 2016 15:29:51 +0000 (-0500) Subject: Fix for org unit order in OPAC holdings list (adapted from X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f097181ecb6b8fd75fa086462b8c5171f51f0e4e;p=evergreen%2Fpines.git Fix for org unit order in OPAC holdings list (adapted from http://git.evergreen-ils.org/?p=evergreen/pines.git;a=commit;h=adc566e152d10796b73c992a16ae46e69cc3ab77) Signed-off-by: Terran McCanna --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm index 418f8841bd..f930712705 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -261,9 +261,19 @@ sub mk_copy_query { where => {id => $org} } } - } + }, + join => { 'parent' => { 'class' => 'aou', 'fkey' => 'parent_ou'} } + } + } + else { + $query->{from}->{acp}->{aou} = { join => { 'parent' => { 'class' => 'aou', 'fkey' => 'parent_ou'} } }; }; - }; + + unshift(@{$query->{order_by}}, + { + class => 'parent', field => 'name' + } + ); # Unsure if we want these in the shared function, leaving here for now unshift(@{$query->{order_by}},