Bug 13152 - Duplicate phone hold notices when using Talking Tech
Summary: Duplicate phone hold notices when using Talking Tech
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-28 12:57 UTC by Kyle M Hall
Modified: 2015-06-04 23:33 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13152 - Duplicate phone hold notices when using Talking Tech (2.12 KB, patch)
2014-10-28 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13152 - Duplicate phone hold notices when using Talking Tech (2.15 KB, patch)
2014-10-28 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13152 - Duplicate phone hold notices when using Talking Tech (2.21 KB, patch)
2014-11-25 16:33 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 13152 - Duplicate phone hold notices when using Talking Tech (2.39 KB, patch)
2014-11-25 19:41 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2014-10-28 12:57:09 UTC
If a library is using Talking Tech for phone notices, any waiting hold phone notice will show up twice!

This is because Koha generates on at the time the hold is set to waiting, and then the cronjob TalkingTech_itiva_outbound.pl generates it's own notice as well. 

The former notice will always have a status of 'pending', as the TalkingTech_itiva_inbound.pl script will update the notice the outbound script created.

The solution is to prevent Koha from creating a phone notice for waiting holds if TT is enabled, and let the cron script do it.
Comment 1 Kyle M Hall 2014-10-28 13:00:40 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2014-10-28 13:09:36 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-11-25 16:31:14 UTC
Note that the code assumes that the phone can only be defined if the pref TalkingTechItivaPhoneNotification is on.

(tools/letter.tt ~l.372             [% ELSIF letter.message_transport_type == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %]).
Comment 4 Jonathan Druart 2014-11-25 16:33:23 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-11-25 19:41:38 UTC
Created attachment 33926 [details] [review]
[PASSED QA] Bug 13152 - Duplicate phone hold notices when using Talking Tech

If a library is using Talking Tech for phone notices, any waiting hold
phone notice will show up twice!

This is because Koha generates on at the time the hold is set to
waiting, and then the cronjob TalkingTech_itiva_outbound.pl generates
it's own notice as well.

The former notice will always have a status of 'pending', as the
TalkingTech_itiva_inbound.pl script will update the notice the outbound
script created.

The solution is to prevent Koha from creating a phone notice for waiting
holds if TT is enabled, and let the cron script do it.

Test Plan:
1) Enable Talking Tech from the system preferences
2) Set a hold waiting phone notice in the notices and slips editor
3) Choose a patron, enable hold phone notices for that patron
4) Place a hold for a patron, and check it in so it's marked as waiting
5) Note the phone notice generated for the patron
6) Apply this patch
7) Repeat step 4
8) Note that this time, a phone hold waiting notice is not generated

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Amends condition with an additional or statement. Shoudn't affect
anything but phone notices. Change appears logical.
Comment 6 Tomás Cohen Arazi 2014-11-25 21:08:39 UTC
Patch pushed to master.

Thanks Kyle!