From 715ce3ecaf0a75ad0ddefcdc876c52696e8537f3 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 3 May 2006 04:09:12 +0000 Subject: [PATCH] update to match autogenerated not-found events. more to come git-svn-id: svn://svn.open-ils.org/ILS/trunk@4037 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/extras/ils_events.xml | 4 ++-- .../src/perlmods/OpenILS/Application/AppUtils.pm | 12 ++++++------ .../perlmods/OpenILS/Application/Circ/Circulate.pm | 6 ++++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/extras/ils_events.xml b/Open-ILS/src/extras/ils_events.xml index ad9efc8625..014fe2da65 100644 --- a/Open-ILS/src/extras/ils_events.xml +++ b/Open-ILS/src/extras/ils_events.xml @@ -31,7 +31,7 @@ User login session has either timed out or does not exist. - + Someone attempted to retrieve a user from the system and the user was not found. @@ -96,7 +96,7 @@ system and the object was not found. - + Someone attempted to retrieve a copy object from the system and the object was not found. diff --git a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm index 75d51a9d91..a0c8ab54ca 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm @@ -328,7 +328,7 @@ sub fetch_closed_date { if(!$cd_obj) { $logger->info("closed_date $cd not found in the db"); - $evt = OpenILS::Event->new('USER_NOT_FOUND'); + $evt = OpenILS::Event->new('ACTOR_USER_NOT_FOUND'); } return ($cd_obj, $evt); @@ -346,7 +346,7 @@ sub fetch_user { if(!$user) { $logger->info("User $userid not found in the db"); - $evt = OpenILS::Event->new('USER_NOT_FOUND'); + $evt = OpenILS::Event->new('ACTOR_USER_NOT_FOUND'); } return ($user, $evt); @@ -420,7 +420,7 @@ sub fetch_copy { 'open-ils.storage', 'open-ils.storage.direct.asset.copy.retrieve', $copyid ); - if(!$copy) { $evt = OpenILS::Event->new('COPY_NOT_FOUND'); } + if(!$copy) { $evt = OpenILS::Event->new('ASSET_COPY_NOT_FOUND'); } return( $copy, $evt ); } @@ -540,7 +540,7 @@ sub fetch_copy_by_barcode { 'open-ils.storage.direct.asset.copy.search_where', { barcode => $barcode, deleted => 'f'} ); #'open-ils.storage.direct.asset.copy.search.barcode', $barcode ); - $evt = OpenILS::Event->new('COPY_NOT_FOUND', barcode => $barcode) unless $copy; + $evt = OpenILS::Event->new('ASSET_COPY_NOT_FOUND', barcode => $barcode) unless $copy; return ($copy, $evt); } @@ -919,7 +919,7 @@ sub fetch_fleshed_copy { $logger->info("Fetching fleshed copy $id"); $copy = $self->storagereq( "open-ils.storage.fleshed.asset.copy.retrieve", $id ); - $evt = OpenILS::Event->new('COPY_NOT_FOUND', id => $id) unless $copy; + $evt = OpenILS::Event->new('ASSET_COPY_NOT_FOUND', id => $id) unless $copy; return ($copy, $evt); } @@ -971,7 +971,7 @@ sub fetch_user_by_barcode { return (undef, OpenILS::Event->new('CARD_NOT_FOUND', barcode => $bc)) unless $cardid; my $user = $self->storagereq( 'open-ils.storage.direct.actor.user.search.card', $cardid ); - return (undef, OpenILS::Event->new('USER_NOT_FOUND', card => $cardid)) unless $user; + return (undef, OpenILS::Event->new('ACTOR_USER_NOT_FOUND', card => $cardid)) unless $user; return ($user); } diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index b0357afc54..db24f22f55 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -94,7 +94,7 @@ sub create_circ_ctx { if(!$params{noncat}) { if( $evt = _ctx_add_copy_objects($ctx, %params) ) { - $ctx->{precat} = 1 if($evt->{textcode} eq 'COPY_NOT_FOUND') + $ctx->{precat} = 1 if($evt->{textcode} eq 'ASSET_COPY_NOT_FOUND') } else { $ctx->{precat} = 1 if ( $ctx->{copy}->call_number == -1 ); # special case copy } @@ -472,6 +472,8 @@ __PACKAGE__->register_method( depth - the hold range depth (defaults to 0) /); +# XXX add pickup lib to the call to test for perms + sub check_title_hold { my( $self, $client, $authtoken, $params ) = @_; my %params = %$params; @@ -1111,7 +1113,7 @@ sub generic_receive { my $copy = $ctx->{copy}; $U->unflesh_copy($copy); - return OpenILS::Event->new('COPY_NOT_FOUND') unless $copy; + return OpenILS::Event->new('ASSET_COPY_NOT_FOUND') unless $copy; $logger->info("Checkin copy called by user ". $requestor->id." for copy ".$copy->id); -- 2.43.2