[open-ils-commits] r12407 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Mar 4 17:12:08 EST 2009


Author: erickson
Date: 2009-03-04 17:12:04 -0500 (Wed, 04 Mar 2009)
New Revision: 12407

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor/MarkItemLost.pm
Log:
plugged in the actual marking lost part

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor/MarkItemLost.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor/MarkItemLost.pm	2009-03-04 22:02:20 UTC (rev 12406)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor/MarkItemLost.pm	2009-03-04 22:12:04 UTC (rev 12407)
@@ -5,6 +5,7 @@
 use Data::Dumper;
 use OpenSRF::Utils::Logger qw/:logger/;
 use OpenILS::Utils::CStoreEditor q/:funcs/;
+use OpenILS::Application::Cat::AssetCommon;
 $Data::Dumper::Indent = 0;
 
 
@@ -26,6 +27,14 @@
     my $self = shift;
     my $env = shift;
     my $e = new_editor(xact => 1);
+    $e->requestor($e->retrieve_actor_user($$env{params}{editor}));
+
+    my $evt = OpenILS::Application::Cat::AssetCommon->set_item_lost($e, $$env{target}->target_copy);
+    if($evt) {
+        $logger->error("trigger: MarkItemLost failed with event ".$evt->{textcode});
+        return 0;
+    }
+
     $e->commit;
     return 1;
 }



More information about the open-ils-commits mailing list