Bug 16568 - Talking Tech generates phone notifications for all overdue actions
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 23 May 2016 14:05:58 +0000 (14:05 +0000)
committerJulian Maurice <julian.maurice@biblibre.com>
Mon, 22 May 2017 14:09:42 +0000 (16:09 +0200)
Regardless of whether the phone transport has been selected for a given
overdue action or not, the Talking Tech outbound script generates and
sends a line for that action.

Test Plan:
1) Enable Talking Tech
2) Create one or more overdue actions without a phone transport selected
   and one or more with the phone transport selected
3) Generate the overdues csv file to send to Itive
4) Note the csv file has lines for actions that do not have the phone
   transport selected
5) Apply this patch
6) Repeat step 3
7) Note the csv file now only has lines for actions that have the phone
   transport selected

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 86678bbc26954e5e4eddf8b11b652b4c83e80425)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 60903c88dc17739548dde43b75078bf08f64a257)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl

index 18e9f86..55519d1 100755 (executable)
@@ -228,7 +228,9 @@ sub GetOverdueIssues {
                 JOIN biblio USING (biblionumber)
                 JOIN branches ON (issues.branchcode = branches.branchcode)
                 JOIN overduerules USING (categorycode)
+                JOIN overduerules_transport_types USING ( overduerules_id )
                 WHERE ( overduerules.branchcode = borrowers.branchcode or overduerules.branchcode = '')
+                AND overduerules_transport_types.message_transport_type = 'phone'
                 AND ( (TO_DAYS(NOW())-TO_DAYS(date_due) ) = delay1
                   OR  (TO_DAYS(NOW())-TO_DAYS(date_due) ) = delay2
                   OR  (TO_DAYS(NOW())-TO_DAYS(date_due) ) = delay3 )