[open-ils-commits] r12403 - in trunk/Open-ILS/src: perlmods/OpenILS/Application/Trigger/Reactor sql/Pg (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 4 16:17:41 EST 2009
Author: erickson
Date: 2009-03-04 16:17:37 -0500 (Wed, 04 Mar 2009)
New Revision: 12403
Added:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor/MarkItemLost.pm
Modified:
trunk/Open-ILS/src/sql/Pg/400.schema.action_trigger.sql
Log:
stub for mark-item-lost reactor
Added: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor/MarkItemLost.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor/MarkItemLost.pm (rev 0)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Reactor/MarkItemLost.pm 2009-03-04 21:17:37 UTC (rev 12403)
@@ -0,0 +1,33 @@
+package OpenILS::Application::Trigger::Reactor::MarkItemLost;
+use base 'OpenILS::Application::Trigger::Reactor';
+use strict; use warnings;
+use Error qw/:try/;
+use Data::Dumper;
+use OpenSRF::Utils::Logger qw/:logger/;
+use OpenILS::Utils::CStoreEditor q/:funcs/;
+$Data::Dumper::Indent = 0;
+
+
+sub ABOUT {
+ return <<ABOUT;
+
+ Marks circulation and corresponding item as lost. This uses
+ the standard mark-lost functionality, creating billings where appropriate.
+
+ Required event parameters:
+ "editor" which points to a user ID. This is the user that effectively
+ performs the action. For example, when the copy status is updated,
+ this user is entered as the last editor of the copy.
+
+ABOUT
+}
+
+sub handler {
+ my $self = shift;
+ my $env = shift;
+ my $e = new_editor(xact => 1);
+ $e->commit;
+ return 1;
+}
+
+1;
Modified: trunk/Open-ILS/src/sql/Pg/400.schema.action_trigger.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/400.schema.action_trigger.sql 2009-03-04 18:47:21 UTC (rev 12402)
+++ trunk/Open-ILS/src/sql/Pg/400.schema.action_trigger.sql 2009-03-04 21:17:37 UTC (rev 12403)
@@ -74,6 +74,7 @@
INSERT INTO action_trigger.reactor (module,description) VALUES ('NOOP_False','Always returns false -- reaction always fails');
INSERT INTO action_trigger.reactor (module,description) VALUES ('SendEmail','Send an email based on a user-defined template');
INSERT INTO action_trigger.reactor (module,description) VALUES ('GenerateBatchOverduePDF','Output a batch PDF of overdue notices for printing');
+INSERT INTO action_trigger.reactor (module,description) VALUES ('MarkItemLost','Marks a circulation and associated item as lost');
-- After an event is reacted to (either succes or failure) a cleanup module is run against the resulting environment
CREATE TABLE action_trigger.cleanup (
More information about the open-ils-commits
mailing list