[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 47b17025cbc82a9435b68323b29a6768ff7645ad

Evergreen Git git at git.evergreen-ils.org
Tue Jan 29 01:07:47 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_2 has been updated
       via  47b17025cbc82a9435b68323b29a6768ff7645ad (commit)
      from  273f7d81d0d25204dd2c67b93e1a687c18358729 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 47b17025cbc82a9435b68323b29a6768ff7645ad
Author: Dan Scott <dscott at laurentian.ca>
Date:   Fri Aug 17 16:07:19 2012 -0400

    Deal with opt-in boundaries defensively
    
    If a site had not set an 'org.patron_opt_default' OU setting, then it
    seemed that a DEFAULT value was getting dumped into the "create opt-in"
    INSERT statement for the org_unit argument, and that (as there is a
    non-NULL constraint on the column and no default value for the column)
    resulted in the patron not getting opted in.
    
    One way for sites to deal with this is to set an opt-in boundary at the
    consortial level, along the lines of:
    
    INSERT INTO actor.org_unit_setting (org_unit, name, value)
      VALUES (1, 'org.patron_opt_default', 2);
    
    Alternatively, in the absense of any such setting, opt-in should
    continue to work as it had before the new feature was added; this change
    keeps the old behaviour active in that case.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: James Fournie <jfournie at sitka.bclibraries.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
index 5c21d3a..c1397ed 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
@@ -3162,8 +3162,11 @@ sub create_user_opt_in_at_org {
         # get the org unit at that depth
         my $org = $e->json_query({ 
             from => [ 'actor.org_unit_ancestor_at_depth', $wsou, $opt_depth ]})->[0];
-
-	$org_id = $org->{id};
+        $org_id = $org->{id};
+    } 
+    if (!$org_id) {
+        # fall back to the workstation OU, the pre-opt-in-boundary way
+        $org_id = $e->requestor->ws_ou;
     }
 
     my $user = $e->retrieve_actor_user($user_id) or return $e->die_event;

-----------------------------------------------------------------------

Summary of changes:
 .../src/perlmods/lib/OpenILS/Application/Actor.pm  |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list