Koha/C4
Ian Walls d29efac4f3 Talking Tech Support - Phase I
Implements support for Talking Tech I-tiva phone notification for OVERDUE, PREDUE and HOLD notifications.
Overdues respect triggers as configured for the patron's branch.
Predue and Holds notifications respect patron's messaging preference choices.
A new column for phone notification is added if the TalkingTechItivaPhoneNotification system preference is turned on

Record of phone messages being sent to patrons is added to the patron's Notices
tab; notice of success or failure can be retrieved from I-tiva.

See the TalkingTech.README for installation and set-up instructions.

Aside from the control system preference, and the necessary changes to Messaging Preferences
forms to make use of phone notifications, the bulk of the code resides in external
cronjobs.

TalkingTech_itiva_outbound.pl generates the Spec C file to send to I-tiva.  Actual transmission
of the file must be handled by the system administrator.

TalkingTech_itiva_inbound.pl processes the received Results file from I-tiva.  Getting the
file from I-tiva to Koha is the job of the system administrator, as well.

Both scripts have a --help option with full documentation.

The only necessary change to core Koha behavior is in C4::Letters::EnqueueLetter.  The return
value was changed from 0 or 1 (successful addition of letter to message_queue or not), to the actual
insert ID of the letter.  This was required by the outbound script to present a unique Transaction ID
for the notice added to the patron's record (so a 'sent' or 'failed' status could be updated).  Since
the dbh and sth are not shared, and the last_insert_id() command is table-specific, this should be thread-safe.
No changes are necessary to any parts of Koha, as all usage of EnqueueLetter currently ignores the return value.

To Test:

1. Turn on TalkingTechItivaPhoneNotification system preference
2. Verify that 'phone' is now a valid notification option for patrons on both staff and OPAC side
3. Attempt to set a 'phone' preference for PREDUE or HOLD messaging; attempt should succeed
4. Set up the patron for notices to triggers:
   a. include checked out items due in a range of days, including the value set up in their messaging preferences.
   b. place several holds, some in position, others waiting for pickup, others in transit.
   c. set the patron up to have overdues, overdue by a range of days that includes the delay values for
the patrons branch and categorycode
5. Run TalkingTech_itiva_outbound.pl --type=RESERVE --type=PREOVERDUE --type=OVERDUE --outfile=/tmp/talkingtechtest.csv

The resulting talkingtechtest.csv file should include all the items due on X days (where X is the patrons' preference),
and none of the ones due in other increments.  Similarly, overdues messages should be added for each item due by a delay
value as configured; overdues of other numbers of days should be ignore.  Holds that are waiting pick up or in transit should
have messages, those still pending should not.

Messages should be added to the patron's notices tab for each issue sent.  Verify these messages exist, and all Notices
tokens are replaced with appropriate information.

Repeat, this time with 4c making use of the default branch overdue triggers, instead of branch-specific triggers.

To test the inbound script, create a CSV with rows in the format "<<Message_id>>","<<SUCCESS or FAIL>>"
Message ID should correspond to the final column of the talkingtechtest.csv file (the transaction id) for the message.

Primary Authorship: Ian Walls
Additional modifications: Kyle M Hall

http://bugs.koha-community.org/show_bug.cgi?id=4246
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Tested and in use in production by two public libraries : Middletown
and Washoe. Both have given their sign off, but don't have git to
actually sign off.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-10 17:46:52 +02:00
..
AuthoritiesMarc Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
Barcodes Bug 5385 - Fixing an error that crept in with the POD cleanup 2010-11-12 10:42:19 +13:00
ClassSortRoutine Bug 4265: Fix padding of short callnumbers and Bib-1 attribute for sorting 2011-03-29 21:54:12 +13:00
Creators Bug 7846 - get_batch_summary massive speedup 2012-05-25 17:47:14 +02:00
External Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
Form Fix for Bug 6458 - incorrect parsing result in translation processing 2011-09-15 08:38:58 +12:00
Heading bug 7284: fix package build problem, move BEGIN into new 2012-04-04 18:18:12 +02:00
ILSDI Bug 5549 : Format Date in ILSDI::Services to include hhmm 2012-03-20 12:37:07 +13:00
Installer Bug 8062 [SIGNED-OFF] Perl module dependency Template::Plugin::HtmlToText 2012-06-09 19:33:30 +02:00
Labels Bug 7615 - Give option to use description for homebranch/holding branch in label creator instead of the branchcode 2012-03-08 16:12:50 +01:00
Linker signed off Bug 7284: Authority matching improvements 2012-03-07 17:34:11 +01:00
Members Bug 8196: FIX for Bug 5742: All extended attributes are shown when editing a patron 2012-06-09 12:37:06 +02:00
OAI Bug 6440: Implement OAI-PMH Sets 2012-03-20 11:38:26 +01:00
Output Fix FSF address in directory C4/ 2010-03-16 20:17:56 -04:00
Patroncards fixing various links to point to *.koha-community.org 2010-10-21 22:08:24 -04:00
Reports Bug 8128 - [SIGNED-OFF]Followup - Change default value for cache_expiry 2012-05-24 15:48:42 +02:00
Search Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
SIP Bug 3638 : Captured Holds may need to generate a transfer 2012-06-05 16:11:18 +02:00
Utils Bug 6836 follow-up fixing POD 2012-01-27 13:58:20 +01:00
VirtualShelves Bug 7805: Exposing the new list permissions in opac and staff 2012-06-09 13:19:13 +02:00
Accounts.pm Bug 7597 - Part 5 - Remove my from $branch, which was masking previous declaration 2012-03-21 17:13:43 +01:00
Acquisition.pm Bug 5337: EAN management : Adds ean for various searches 2012-06-09 18:26:34 +02:00
Auth.pm Bug 7935: Introduce sys pref to control 'browse results' in OPAC 2012-04-10 15:26:37 +02:00
Auth_cas_servers.yaml.orig Bug 5630 CAS improvements 2011-10-13 10:49:49 +13:00
Auth_with_cas.pm Bug 7745: Wrong service name for CAS authentification 2012-03-22 06:21:23 +01:00
Auth_with_ldap.pm Bug 6022: Auth_with_ldap check if categorycode is valid 2011-12-06 19:51:15 +01:00
AuthoritiesMarc.pm BUG5312 XHTML correction in authority summary 2012-06-10 11:17:16 +02:00
BackgroundJob.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Barcodes.pm Bug 6679: Fixing 13 perlcritic violations in C4/Barcodes.pm 2012-06-10 15:06:33 +02:00
Biblio.pm Bug 5337: EAN management : Adds ean for various searches 2012-06-09 18:26:34 +02:00
Bookseller.pm Bug 7291: Adds new field aqbooksellers.deliverytime 2012-04-03 18:19:46 +02:00
Boolean.pm Bug 5448: Refactor Boolean.pm 2010-12-02 08:51:33 +13:00
Branch.pm bug_7264: [SIGNED-OFF] Branch popup on OPAC detail.Added opac_info field to branches table. 2012-03-22 11:50:00 +01:00
Breeding.pm bug_7613: OCLC Connexion gateway 2012-04-06 17:26:20 +02:00
Budgets.pm bug_4831: Use unitprice (actual cost) when totalling spent amounts for "All available funds", as in "Already received" 2011-09-22 19:35:40 +12:00
Calendar.pm Bug 7477: Followup: Fix perlcritic issues 2012-03-19 18:16:40 +01:00
Category.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
Charset.pm Bug 7400: Add auto-completion on auth_finder 2012-03-19 18:20:30 +01:00
Circulation.pm Bug 8005 - Lost item is not anonymized when checked in 2012-06-10 12:34:08 +02:00
ClassSortRoutine.pm Bug 7035 de-nesting C4::ClassSource & ClassSortRoutine 2011-10-19 03:25:59 +13:00
ClassSource.pm Bug 7035 de-nesting C4::ClassSource & ClassSortRoutine 2011-10-19 03:25:59 +13:00
Context.pm Bug 5549 : Add a timezone object to C4::Context 2012-03-20 12:08:20 +13:00
Contract.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Creators.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
Csv.pm Bug 2505 - Add commented use warnings where missing in *.pm 2010-04-21 20:28:51 +12:00
Dates.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
Debug.pm More POD cleanups 2010-06-09 08:38:58 -04:00
Heading.pm Bug 7617: Sort authority results by authid 2012-03-29 11:04:58 +02:00
Images.pm Bug 7600: Return a single-pixel GIF when no local cover image exists 2012-03-20 16:54:31 +01:00
ImportBatch.pm bug_7613: OCLC Connexion gateway 2012-04-06 17:26:20 +02:00
ImportExportFramework.pm Bug 7476 Remove executable bit from files that probably should not be executed 2012-02-03 14:22:15 +01:00
Input.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Installer.pm Bug 6008 - Locating mysql/psql commands on Installer.pm 2012-02-27 15:38:07 +01:00
ItemCirculationAlertPreference.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
Items.pm Bug 7872 - C4::Items::GetItemsInfo should use C4::Koha instead of SQL queries directly 2012-06-10 11:08:14 +02:00
ItemType.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
Koha.pm Bug 7977: Adding Daily Quotes Tests to Koha.t test suite; also fixing sort order on quote selection SQL 2012-05-24 14:14:45 +02:00
Labels.pm Bringing label, patroncard, and creator modules into conformity with the rest of C4 style. 2010-02-08 20:54:34 -05:00
Languages.pm Bug 6193 - Follow up: use SetEnv and remove memcached from koha-conf.xml 2012-02-20 23:24:02 +01:00
Letters.pm Talking Tech Support - Phase I 2012-06-10 17:46:52 +02:00
Linker.pm Bug 7284: Fix unit test broken by erroneous POD 2012-03-08 15:24:18 +01:00
Log.pm Bug 6460: alternative fix, updating template and script instead of C4::Log 2011-09-24 10:01:09 +12:00
Maintainance.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Matcher.pm bug_7613: OCLC Connexion gateway 2012-04-06 17:26:20 +02:00
Members.pm Bug 8129 - Quickslips not printing 2012-06-05 15:29:43 +02:00
Message.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
NewsChannels.pm Fix FSF address in directory C4/ 2010-03-16 20:17:56 -04:00
Output.pm Bug 5668 - Star ratings in the opac 2012-04-10 14:40:49 +02:00
Overdues.pm bug 7849 Instant Fine Calculation\n Adds functionality of calculate fines instantly. This is very important for Hourly loans becuase of a loophole from the cron. 2012-04-19 17:52:18 +02:00
Patroncards.pm Fix some compile time errors reported in test suite 2010-12-02 08:53:53 +13:00
Print.pm bug_8056: sorted out slip print calls 2012-05-28 13:52:39 +02:00
Ratings.pm Bug 5668 - Star ratings in the opac 2012-04-10 14:40:49 +02:00
Record.pm Bug 7345: Enable exporting records sans private fields 2012-02-13 11:32:18 +01:00
Reports.pm More POD cleanups 2010-06-09 08:38:58 -04:00
Reserves.pm Bug 7641 - Followup - Suspend Until not set on by suspend button. 2012-05-15 15:48:12 +02:00
Review.pm Bug 1623 - Provide view of approved comments 2011-12-27 18:26:50 +01:00
Ris.pm Bug 2505 follow-up: C4::Ris not ready for use strict;use warnings; 2012-04-10 15:08:47 +02:00
RotatingCollections.pm Fix some compile time errors reported in test suite 2010-12-02 08:53:53 +13:00
Scheduler.pm POD Cleanups 2010-06-09 08:38:59 -04:00
Scrubber.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
Search.pm Bug 7818: use Title-cover for title phrase weighting 2012-06-09 11:44:11 +02:00
Serials.pm Bug 5337: EAN management : Adds ean for various searches 2012-06-09 18:26:34 +02:00
Service.pm POD Cleanups 2010-06-09 08:38:59 -04:00
ShelfBrowser.pm Bug 5551 - allow shelf browser filters to be changed 2011-01-21 11:08:42 +13:00
SMS.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
SocialData.pm bug 7470 follow-up, fix POD doc 2012-03-26 17:53:28 +02:00
SQLHelper.pm Bug 7432 : Fixing caching for SQLHelper 2012-02-15 10:26:24 +01:00
Stats.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Suggestions.pm bug_7001: Issue and Reserve slips are notices. 2012-03-09 10:11:20 +01:00
Tags.pm Bug 6679: Fixing 26 perlcritic violations in C4/Tags.pm 2012-06-10 15:16:01 +02:00
Templates.pm Bug 8019 - Preserve language choice between Browser sessions 2012-05-14 18:37:56 +02:00
TmplToken.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
TmplTokenType.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
TTParser.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
UploadedFile.pm Bug 1633: [SIGNED-OFF] Add support for uploading images to Koha 2012-01-24 11:16:02 +01:00
Utils.pm Bug 4330 : Adding copyright headers and fixing FSF addresses 2012-05-28 17:54:25 +02:00
VirtualShelves.pm Bug 7805: Exposing the new list permissions in opac and staff 2012-06-09 13:19:13 +02:00
XISBN.pm Fix for Bug 5570 - item types not showing on other editions 2011-01-07 14:18:09 +13:00
XSLT.pm Bug 7821 - fix C4::Templates::_current_language 2012-04-02 11:33:17 +02:00
Z3950.pm fixing various links to point to *.koha-community.org 2010-10-21 22:08:24 -04:00