Patch from James Fournie -- fixing org tree fleshing depth.
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 14 Jul 2009 16:36:52 +0000 (16:36 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 14 Jul 2009 16:36:52 +0000 (16:36 +0000)
====
I was having a horrible time getting the hasCommonAncestor() function
to work in the circ Javascripts.  I eventually discovered that
ScriptBuilder.pm was making a cstore actor.org_unit search with flesh
= 2, which limited the search to org units above depth 2.  My org
units were depth 3.  I changed the cstore flesh to -1 and this seems
to retreive all org units.  I also found an similar problem in
AppUtils.pm

git-svn-id: svn://svn.open-ils.org/ILS/trunk@13584 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/ScriptBuilder.pm

index c69d2e1..b83b177 100644 (file)
@@ -1068,7 +1068,7 @@ sub fetch_org_tree {
                [
                        {"parent_ou" => undef },
                        {
-                               flesh                           => 2,
+                               flesh                           => -1,
                                flesh_fields    => { aou =>  ['children'] },
                                order_by       => { aou => 'name'}
                        }
index 8c31b91..0b9ebbc 100644 (file)
@@ -279,7 +279,7 @@ sub insert_org_methods {
                        [
                                {"parent_ou" => undef },
                                {
-                                       flesh                           => 2,
+                                       flesh                           => -1,
                                        flesh_fields    => { aou =>  ['children'] },
                                        order_by                        => { aou => 'name'}
                                }