From 2864402f1dac22b1bdcf566473bdead3fff896e6 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 29 Oct 2007 14:17:54 +0000 Subject: [PATCH] backporting hold stalling logic: svn merge -r7740:7741 svn://svn.open-ils.org/ILS/trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@7941 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm | 10 +++++++--- 1 file changed, 7 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 8a7e8252e6..9bce55d7df 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -1231,7 +1231,7 @@ sub find_nearest_permitted_hold { my $class = shift; my $editor = shift; # CStoreEditor object my $copy = shift; # copy to target - my $user = shift; # hold recipient + my $user = shift; # staff my $check_only = shift; # do no updates, just see if the copy could fulfill a hold my $evt = OpenILS::Event->new('ACTION_HOLD_REQUEST_NOT_FOUND'); @@ -1248,12 +1248,16 @@ sub find_nearest_permitted_hold { # hold->type "R" means we need this copy for my $h (@$old_holds) { return ($h) if $h->hold_type eq 'R'; } - $logger->info("circulator: searching for best hold at org ".$user->ws_ou." and copy $bc"); + + my $hold_stall_interval = $U->ou_ancestor_setting_value($user->ws_ou, 'circ.hold_stalling.soft'); + + $logger->info("circulator: searching for best hold at org ".$user->ws_ou. + " and copy $bc with a hold stalling interval of ". ($hold_stall_interval || "(none)")); # search for what should be the best holds for this copy to fulfill my $best_holds = $U->storagereq( "open-ils.storage.action.hold_request.nearest_hold.atomic", - $user->ws_ou, $copy->id, 10 ); + $user->ws_ou, $copy->id, 10, $hold_stall_interval ); unless(@$best_holds) { -- 2.11.0