From 2cf3b7745a0e8c346d497d26291282f73871ae35 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Wed, 20 Jan 2016 10:29:51 -0500 Subject: [PATCH] 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 --- .../src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 04f3cbea85..e0b8f18d68 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -276,9 +276,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}}, -- 2.11.0