LP#1771422 Reset transiting hold copy status fix
authorBill Erickson <berickxx@gmail.com>
Tue, 15 May 2018 20:12:12 +0000 (16:12 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 25 May 2018 19:50:52 +0000 (15:50 -0400)
Avoid modifying the copy status in the hold-reset API when it's passing
the copy off to the transit API for canceling the transit.  Let the
transit API handle the status instead.

This fixes a bug where resetting a transiting hold, and canceling its
transit, would leave the targeted copy in "in transit" status instead of
"canceled transit".

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm

index 350fde2..b15de7c 100644 (file)
@@ -1978,8 +1978,6 @@ sub _reset_hold {
 
         } elsif( $copy->status == OILS_COPY_STATUS_IN_TRANSIT ) {
 
-            # We don't want the copy to remain "in transit"
-            $copy->status(OILS_COPY_STATUS_RESHELVING);
             $logger->warn("! reseting hold [$hid] that is in transit");
             my $transid = $e->search_action_hold_transit_copy({hold=>$hold->id,cancel_time=>undef},{idlist=>1})->[0];