[open-ils-commits] r9072 -
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 18 13:08:44 EDT 2008
Author: erickson
Date: 2008-03-18 12:34:32 -0400 (Tue, 18 Mar 2008)
New Revision: 9072
Modified:
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
implemented soft hold ceilings
Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2008-03-18 16:13:55 UTC (rev 9071)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2008-03-18 16:34:32 UTC (rev 9072)
@@ -1027,9 +1027,16 @@
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");
More information about the open-ils-commits
mailing list