[open-ils-commits] r15914 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Mar 18 14:34:33 EDT 2010


Author: miker
Date: 2010-03-18 14:34:29 -0400 (Thu, 18 Mar 2010)
New Revision: 15914

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
return mapped legacy events from in-db circ, so that precat copies check out properly

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-03-18 18:33:40 UTC (rev 15913)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-03-18 18:34:29 UTC (rev 15914)
@@ -970,6 +970,7 @@
 }
 
 my $LEGACY_CIRC_EVENT_MAP = {
+    'no_item' => 'ITEM_NOT_CATALOGED',
     'actor.usr.barred' => 'PATRON_BARRED',
     'asset.copy.circulate' =>  'COPY_CIRC_NOT_ALLOWED',
     'asset.copy.status' => 'COPY_NOT_AVAILABLE',
@@ -1044,11 +1045,16 @@
     my $dbfunc = ($self->is_renewal) ? 
         'action.item_user_renew_test' : 'action.item_user_circ_test';
 
+    if( $self->is_precat && $self->request_precat) {
+        $self->make_precat_copy;
+        return if $self->bail_out;
+    }
+
     my $results = $self->editor->json_query(
         {   from => [
                 $dbfunc,
                 $self->editor->requestor->ws_ou,
-                ($self->is_precat or $self->is_noncat) ? undef : $self->copy->id, 
+                ($self->is_noncat or ($self->is_precat and !$self->override)) ? undef : $self->copy->id, 
                 $self->patron->id,
             ]
         }



More information about the open-ils-commits mailing list