From 56ba23858fbaff1b9df6920f12945e2e3b9ae131 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 18 Mar 2008 16:34:32 +0000 Subject: [PATCH] implemented soft hold ceilings git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@9072 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index 428cdf746d..078e68ccb0 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -1027,9 +1027,16 @@ sub check_title_hold { return {success => 0}; } - } elsif(defined $soft_ceiling) { - $logger->info("performing hold possibility check with soft ceiling $soft_ceiling"); - # XXX soft ceilings. work up the tree until a potential copy is found + } elsif(defined $soft_ceiling and $$params{depth} < $soft_ceiling) { + my $depth = $soft_ceiling; + # work up the tree and as soon as we find a potential copy, use that depth + while($depth >= $$params{depth}) { + $logger->info("performing hold possibility check with soft ceiling $depth"); + return {success => 1, depth => $depth} + if do_possibility_checks($e, $patron, $request_lib, $depth, %params); + $depth--; + } + return {success => 0}; } else { $logger->info("performing hold possibility check with no ceiling"); -- 2.11.0