Make Force/Recall holds always return as nearest user/tsbere/fix_force_recall_nearest
authorThomas Berezansky <tsbere@mvlc.org>
Thu, 26 Jul 2012 14:25:32 +0000 (10:25 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Thu, 26 Jul 2012 14:25:32 +0000 (10:25 -0400)
Without even running the hold rules.

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

index b72db96..0f8fd60 100644 (file)
@@ -2955,6 +2955,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);