From: Bill Erickson Date: Fri, 27 Jul 2012 22:09:22 +0000 (-0400) Subject: vandelay copy overlay; prevent update of unrelated copies X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=486c558ec6d0086032161763acfab7dc3452bb98;p=evergreen%2Fequinox.git vandelay copy overlay; prevent update of unrelated copies Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm index 139e147df9..3f75236c83 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm @@ -1614,6 +1614,18 @@ sub import_record_asset_list_impl { next; } + # prevent update of unrelated copies + if ($copy->call_number->record != $rec->imported_as) { + $evt = OpenILS::Event->new('INVALID_IMPORT_COPY_ID', + note => 'Cannot overlay copies for unlinked bib', + bre => $rec->imported_as, + copy_id => $copy_id + ); + $$report_args{evt} = $evt; + respond_with_status($report_args); + next; + } + # overlaying copies requires an extra permission if (!$e->allowed("IMPORT_OVERLAY_COPY", $copy->call_number->owning_lib)) { $$report_args{evt} = $e->die_event;