From: Chris Sharp Date: Mon, 15 Aug 2016 22:06:18 +0000 (-0400) Subject: LP#1306666 - Only set "Canceled Transit" status on "In Transit" copies X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=383b318a3137c56158946344e08918453cc9753a;p=working%2FEvergreen.git LP#1306666 - Only set "Canceled Transit" status on "In Transit" copies Signed-off-by: Chris Sharp --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm index f5bee54dea..8fe22c800e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm @@ -239,10 +239,12 @@ sub __abort_transit { return $e->die_event unless $e->allowed('ABORT_REMOTE_TRANSIT', $e->requestor->ws_ou); } - # set the copy status to "Canceled Transit" - $copy->status( OILS_COPY_STATUS_CANCELED_TRANSIT ); - $copy->editor( $e->requestor->id ); - $copy->edit_date('now'); + # if the copy status is "In Transit", set the copy status to "Canceled Transit" + if( $copy->status == OILS_COPY_STATUS_IN_TRANSIT ) { + $copy->status( OILS_COPY_STATUS_CANCELED_TRANSIT ); + $copy->editor( $e->requestor->id ); + $copy->edit_date('now'); + } my $holdtransit = $e->retrieve_action_hold_transit_copy($transit->id);