Make Force/Recall holds always return as nearest
authorThomas Berezansky <tsbere@mvlc.org>
Thu, 26 Jul 2012 14:25:32 +0000 (10:25 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 7 Jun 2013 16:41:44 +0000 (12:41 -0400)
Without even running the hold rules.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

(Just whitespace conflicts on tab vs space -- repaired by hand.)

Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

index 924da08..1df7239 100644 (file)
@@ -3076,6 +3076,11 @@ sub find_nearest_permitted_hold {
         $logger->info("circulator: checking if hold $holdid is permitted for copy $bc");
 
         my $hold = $editor->retrieve_action_hold_request($holdid) or next;
+        # Force and recall holds bypass all rules
+        if ($hold->hold_type eq 'R' || $hold->hold_type eq 'F') {
+            $best_hold = $hold;
+            last;
+        }
         my $reqr = $reqr_cache{$hold->requestor} || $editor->retrieve_actor_user($hold->requestor);
         my $rlib = $org_cache{$hold->request_lib} || $editor->retrieve_actor_org_unit($hold->request_lib);