added hold-type "R" logic to short-circuit the best-hold searching to use the hold...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Dec 2006 16:35:23 +0000 (16:35 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Dec 2006 16:35:23 +0000 (16:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6690 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index b3589ef..b722c8d 100644 (file)
@@ -1083,6 +1083,9 @@ sub find_nearest_permitted_hold {
                } 
        );
 
+       # hold->type "R" means we need this copy
+       for my $h (@$old_holds) { return ($h) if $h->type eq 'R'; }
+
        $logger->info("circulator: searching for best hold at org ".$user->ws_ou." and copy $bc");
 
        # search for what should be the best holds for this copy to fulfill