Unfortunately, you can't simply assume that the top of the org tree will have an ID of '1'.
Additionally, as coded, this will be useless for a significant set of existing Evergreen users where they want to check more broadly than a branch, but not everywhere. Instead of having an all-or-nothing choice, I recommend allowing the selection of an org unit depth as the YAOUS, and then use the existing org_unit_ancestor_at_depth() method available in OpenILS::Application::AppUtils to get the appropriate org unit id.
I feel relatively strongly about this, so I'm setting the bug to incomplete.
Unfortunately, you can't simply assume that the top of the org tree will have an ID of '1'.
Additionally, as coded, this will be useless for a significant set of existing Evergreen users where they want to check more broadly than a branch, but not everywhere. Instead of having an all-or-nothing choice, I recommend allowing the selection of an org unit depth as the YAOUS, and then use the existing org_unit_ ancestor_ at_depth( ) method available in OpenILS: :Application: :AppUtils to get the appropriate org unit id.
I feel relatively strongly about this, so I'm setting the bug to incomplete.