From: Mike Rylander Date: Wed, 19 Sep 2018 15:16:39 +0000 (-0400) Subject: LP#1791335: Retain stat cats on item transfer X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ab4ab582177f081449adc28b9903516ab4efaadb;p=evergreen%2Fpines.git LP#1791335: Retain stat cats on item transfer For some reason, parts were protected during item transfer, but stat cats were not. This commit protects them by fleshing stat cat entries in the outer item transfer method. Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm index 19c0b6ad84..2753d01173 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm @@ -852,8 +852,14 @@ sub transfer_copies_to_volume { my $fleshed_copies = []; my ($copy, $copy_evt); foreach my $copy_id ( @{ $copies } ) { - ($copy, $copy_evt) = $U->fetch_copy($copy_id); - return $copy_evt if $copy_evt; + $copy = $editor->search_asset_copy([ + { id => $copy_id , deleted => 'f' }, + { + flesh => 1, + flesh_fields => { acp => ['parts', 'stat_cat_entries'] } + } + ])->[0]; + return OpenILS::Event->new('ASSET_COPY_NOT_FOUND') if !$copy; $copy->call_number( $volume ); $copy->circ_lib( $cn->owning_lib() ); $copy->ischanged( 't' );