From 409c5b73616475c11e43f5073fc156825d1f14bc Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 5 Dec 2012 13:20:02 -0500 Subject: [PATCH] csv notify Signed-off-by: Bill Erickson --- .../Application/Trigger/Reactor/NotifyCSV.pm | 46 ---------------------- .../src/support-scripts/csv_notify_pusher.pl | 0 notify-csv.tt2 | 6 +-- 3 files changed, 3 insertions(+), 49 deletions(-) delete mode 100644 Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/NotifyCSV.pm rename itiva_pusher.pl => Open-ILS/src/support-scripts/csv_notify_pusher.pl (100%) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/NotifyCSV.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/NotifyCSV.pm deleted file mode 100644 index c4fd23f78b..0000000000 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/NotifyCSV.pm +++ /dev/null @@ -1,46 +0,0 @@ -package OpenILS::Application::Trigger::Reactor::NotifyCSV; -use base "OpenILS::Application::Trigger::Reactor"; -use strict; use warnings; - -sub ABOUT { - return q| -Creates a CSV representation of patron actions for the purposes of notifying -the patron via external notification mechanisms. - -Event Environment Requirements - -* patron object with card -* org unit - -Required Event Parameters - -notify_media (e.g. phone) -notify_type (e.g. overdue) -notify_level (e.g. "1" -- first overdue) - -The set of options for each event parameter is dependent on the 3rd-party -processing the CSV file. Using iTiva as the reference implementation, event -parameter values options include: - -notify_media : 'V' (voice), 'T' (text) -notify_level : '1' (1st notice), '2' (2nd notice...) , '3' -notify_type : - 'FINES', - 'OVERDUE', - 'PREOVERDUE', - 'PRERESERVE', - 'RECALL', - 'RESERVE', - 'RESERVECANCEL', - 'RESERVEEXPIRE', - 'SUSPEND' -|; -} - -sub handler { - my ($self, $env) = @_; - return 1 if $self->run_TT($env); - return 0; -} - -1; diff --git a/itiva_pusher.pl b/Open-ILS/src/support-scripts/csv_notify_pusher.pl similarity index 100% rename from itiva_pusher.pl rename to Open-ILS/src/support-scripts/csv_notify_pusher.pl diff --git a/notify-csv.tt2 b/notify-csv.tt2 index be006089c0..28d4f688a5 100644 --- a/notify-csv.tt2 +++ b/notify-csv.tt2 @@ -26,7 +26,7 @@ due_date = date.format( helpers.format_date(circ.due_date), '%d/%m/%Y'); - ELSIF core_type == 'ahr': + ELSIF core_type == 'ahr'; # e.g. hold ready for pickup hold = target_obj; user = hold.usr; @@ -38,13 +38,13 @@ user = target_obj.usr; org_unit = target_obj.org_unit; - ELSIF core_type == 'au': + ELSIF core_type == 'au'; # e.g. barred user = target_obj; org_unit = user.home_ou; END; - user_locale = helpers.get_user_locale(user.id)); + user_locale = helpers.get_user_locale(user.id); user_lang = user_locale | replace('-.*', ''); # ISO 639-1 language user_phone = helpers.get_user_setting( user.id, 'opac.default_phone') || user.day_phone; -- 2.11.0