[open-ils-commits] r7941 - branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Oct 29 10:32:20 EDT 2007


Author: erickson
Date: 2007-10-29 10:17:54 -0400 (Mon, 29 Oct 2007)
New Revision: 7941

Modified:
   branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
backporting hold stalling logic: svn merge -r7740:7741 svn://svn.open-ils.org/ILS/trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm

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	2007-10-29 00:43:56 UTC (rev 7940)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2007-10-29 14:17:54 UTC (rev 7941)
@@ -1231,7 +1231,7 @@
 	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 @@
 	# 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) {
 



More information about the open-ils-commits mailing list