From 905a1cf353bec632f00d0974a5ba745051e30339 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 24 Jun 2016 16:56:58 -0400 Subject: [PATCH] JBAS-1741 Hold targeter v2 gets KCLS has-checked-out-copy Cross-port code to implement KCLS policy of leaving holds alive so long as a checked out copy exists regardless of whether the targeter has reached max org unit target attempt loops. Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Utils/HoldTargeter.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/HoldTargeter.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/HoldTargeter.pm index a42638c806..a721f8a06a 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/HoldTargeter.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/HoldTargeter.pm @@ -985,6 +985,12 @@ sub target_by_org_loops { # back to waiting for another copy (or retargets its current copy). return undef if $max_tried < $max_loops; + if (@{$self->recall_copies}) { # KCLS + $self->log_hold("Skipping max-loops cancellation because ". + "there is at least one checked out copy in circulation"); + return undef; + } + # At least one lib has been targeted max-loops times and zero # other copies are targetable. All options have been exhausted. return $self->handle_exceeds_target_loops; -- 2.11.0