From 7f9c088f415aad41ab0f47076d9473b8fdb595d4 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 8 Aug 2006 02:05:13 +0000 Subject: [PATCH] added deleted check to copy search, not responding with event if copy circ-lib == destination circ-lib git-svn-id: svn://svn.open-ils.org/ILS/trunk@5355 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Cat.pm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm index b818a1543d..ad13346195 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm @@ -1212,14 +1212,24 @@ sub batch_volume_transfer { # take note of the fact that we've looked at this set of volumes push( @seen, $_->id ) for @all; - # for each volume, see if there are any copies that have a - # remote circ_lib (circ_lib != vol->owning_lib). if so, warn them + # remote circ_lib (circ_lib != vol->owning_lib and != $o_lib ). + # if so, warn them unless( $self->api_name =~ /override/ ) { for my $v (@all) { + $logger->debug("merge: searching for copies with remote circ_lib for volume ".$v->id); - my $copies = $e->search_asset_copy( - { call_number=>$v->id, circ_lib => { '!=' => $v->owning_lib } }, {idlist=>1}); + my $args = { + call_number => $v->id, + circ_lib => { "!=" => $v->owning_lib }, + deleted => 'f' + }; + + my $copies = $e->search_asset_copy($args, {idlist=>1}); + + # if the copy's circ_lib matches the destination lib, + # that's ok too + $copies = [ grep { $_->circ_lib ne $o_lib } @$copies ]; return OpenILS::Event->new('COPY_REMOTE_CIRC_LIB') if @$copies; } } -- 2.11.0