Patch from Dan Wells to make the results returned when using in-db circ look more...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 15 Jan 2010 21:06:00 +0000 (21:06 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 15 Jan 2010 21:06:00 +0000 (21:06 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15328 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm

index bf7a14c..e2d8ac8 100644 (file)
@@ -634,7 +634,7 @@ sub mk_env {
         my $copy;
            my $flesh = { 
                    flesh => 2, 
-                   flesh_fields => {acp => ['call_number'], acn => ['record']} 
+                   flesh_fields => {acp => ['location', 'status', 'circ_lib', 'age_protect', 'call_number'], acn => ['record']}
            };
            if($self->copy_id) {
                    $copy = $e->retrieve_asset_copy(
@@ -1005,6 +1005,11 @@ sub run_patron_permit_scripts {
         push(@allevents, OpenILS::Event->new($_)) for (@$patron_events);
     }
 
+    for (@allevents) {
+       $_->{payload} = $self->copy if 
+             ($_->{textcode} eq 'COPY_NOT_AVAILABLE');
+    }
+
     $logger->info("circulator: permit_patron script returned events: @allevents") if @allevents;
 
     $self->push_events(@allevents);