Fix for PINES-Specific Holdings Sort Order
authorMcCanna <tmccanna@georgialibraries.org>
Wed, 20 Dec 2017 18:45:44 +0000 (13:45 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 19 Nov 2022 19:52:45 +0000 (14:52 -0500)
See Tom Berezansky's original fix at:
http://git.evergreen-ils.org/?p=evergreen/pines.git;a=commit;h=adc566e152d10796b73c992a16ae46e69cc3ab77

Some changes to the base code required this fix to be updated.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm

index 91d6bcf..38e4381 100644 (file)
@@ -399,8 +399,14 @@ sub mk_copy_query {
                         where => {id => $filter_orgs}
                     }
                 }
-            }
-        }};
+            },
+            join => { 'parent' => { 'class' => 'aou', 'fkey' => 'parent_ou'} }
+        }
+    }}
+    else {
+        $query->{from}->{acp}->[1] = {aou => { 
+            join => { 'parent' => { 'class' => 'aou', 'fkey' => 'parent_ou'} } }
+        }; 
     };
 
     my $ou_sort_param = [$org, $pref_ou ];