Check for a selection_depth returned from title_hold.is_possible.
authorJames Fournie <jfournie@sitka.bclibraries.ca>
Tue, 18 Dec 2012 20:45:51 +0000 (12:45 -0800)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 19 Dec 2012 19:36:24 +0000 (14:36 -0500)
See Launchpad 1064651 for details.  This is a quick fix which solves a
fairly serious issue whereby copies outside of a hard boundary could fill
holds when they are placed within the TPAC in the staff client.

Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

index 0b188bf..d713fd3 100644 (file)
@@ -93,6 +93,9 @@ sub test_and_create_hold_batch {
         ($res) = $self->method_lookup(
             'open-ils.circ.title_hold.is_possible')->run($auth, $params, $override ? $oargs : {});
         if ($res->{'success'} == 1) {
+
+            $params->{'depth'} = $res->{'depth'} if $res->{'depth'};
+
             my $ahr = construct_hold_request_object($params);
             my ($res2) = $self->method_lookup(
                 $override