From: Mark Cooper Date: Tue, 23 Oct 2012 05:01:22 +0000 (-0700) Subject: LP#1066629: Acq: Receiving an item should not change the status to "In Process" in... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ea7ecb2dc7bdb12582aac55ca7e92a416592cecd;p=working%2FEvergreen.git LP#1066629: Acq: Receiving an item should not change the status to "In Process" in many cases As suggested, when received, restrict copy status update for lineitem copies to only those that were on-order. Otherwise copies may have the status set to 'In Process' inappropriately. Signed-off-by: Mark Cooper Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm index 45156c0f7d..dcd33b2191 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm @@ -713,7 +713,8 @@ sub receive_lineitem_detail { if ($lid->eg_copy_id) { my $copy = $e->retrieve_asset_copy($lid->eg_copy_id) or return 0; - $copy->status(OILS_COPY_STATUS_IN_PROCESS); + # only update status if it hasn't already been updated + $copy->status(OILS_COPY_STATUS_IN_PROCESS) if $copy->status == OILS_COPY_STATUS_ON_ORDER; $copy->edit_date('now'); $copy->editor($e->requestor->id); $copy->creator($e->requestor->id) if $U->ou_ancestor_setting_value(