From cf80a991f6e16fe62ca00ca49ec590138790f9c8 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 11 Nov 2009 21:25:06 +0000 Subject: [PATCH] for consistency, also flesh the copy in the resulting circ/hold objects git-svn-id: svn://svn.open-ils.org/ILS/trunk@14872 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 5ee73bafe8..befdb1e2db 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -3437,6 +3437,8 @@ sub copy_events { (my $obj_type = $self->api_name) =~ s/.*\.([a-z]+)$/$1/; + my $copy = $e->retrieve_asset_copy($copy_id) or return $e->event; + my $copy_field = 'target_copy'; $copy_field = 'current_copy' if $obj_type eq 'ahr'; @@ -3447,6 +3449,7 @@ sub copy_events { where => {$copy_field => $copy_id} }; + my $ses = OpenSRF::AppSession->create('open-ils.trigger'); my $req = $ses->request('open-ils.trigger.events_by_target', $obj_type, $filters, {atevdef => ['reactor', 'validator']}, 2); @@ -3460,6 +3463,8 @@ sub copy_events { return $e->event unless $e->allowed('VIEW_USER', $user->home_ou); } + $tgt->$copy_field($copy); + $tgt->usr($user); $conn->respond($val) if $val; } -- 2.11.0