--- /dev/null
+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;
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 (