From 793df7a4ae065c12aaa499fa25f019ef7d0e4b74 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 20 Sep 2006 14:21:10 +0000 Subject: [PATCH] setting status to reshelving of hold was cancelled and the copy was in transit git-svn-id: svn://svn.open-ils.org/ILS/trunk@6154 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index b4b8c45323..bd2a9a1373 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -448,8 +448,6 @@ sub cancel_hold { } elsif( $copy->status == OILS_COPY_STATUS_IN_TRANSIT ) { my $hid = $hold->id; - # We don't want the copy to remain "in transit" - $copy->status(OILS_COPY_STATUS_RESHELVING); $logger->warn("! canceling hold [$hid] that is in transit"); my $transid = $e->search_action_hold_transit_copy({hold=>$hold->id},{idlist=>1})->[0]; @@ -462,6 +460,14 @@ sub cancel_hold { return $evt unless "$evt" eq 1; } } + + # We don't want the copy to remain "in transit" or to recover + # any previous statuses + $logger->info("setting copy back to reshelving in hold+transit cancel"); + $copy->status(OILS_COPY_STATUS_RESHELVING); + $copy->editor($e->requestor->id); + $copy->edit_date('now'); + $e->update_asset_copy($copy) or return $e->event; } } -- 2.11.0