From 7806dcfb953481a195cb9812266a7d331db354f2 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 18 Mar 2008 16:35:05 +0000 Subject: [PATCH] implemented soft hold ceilings git-svn-id: svn://svn.open-ils.org/ILS/trunk@9073 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../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 51f690c406..4a3f5699df 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -1028,9 +1028,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.43.2