Bug 20457: Overdue and pre-overdue cronjobs not skipping phone notices

The overdue and pre-overdue cron scripts are not skipping the generation of phone notices. This causes many phone notices to be created that will always be left at 'pending' as the Talking Tech outbound script creates its own phone notices and puts them in the message queue.

Test Plan:
1) Enable Talking Tech
2) Enable predue and overdue notice phone transports for a patron
3) Generate overdues and predues, notice phone notices are generated
4) Apply the patch
5) Repeat steps 2-3
6) Note phone notices are not generated

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bf6bbc29a0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2a14f470f7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Kyle M Hall 2019-03-25 14:03:16 -04:00 committed by Arthur Suzuki
parent ab44544147
commit 9b2f271f18
2 changed files with 4 additions and 0 deletions

View File

@ -304,6 +304,7 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) {
## Get branch info for borrowers home library.
foreach my $transport ( keys %{$borrower_preferences->{'transports'}} ) {
next if $transport eq 'itiva';
my $letter = parse_letter( { letter_code => $letter_type,
borrowernumber => $upcoming->{'borrowernumber'},
branchcode => $branchcode,
@ -351,6 +352,7 @@ UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) {
## Get branch info for borrowers home library.
foreach my $transport ( keys %{$borrower_preferences->{'transports'}} ) {
next if $transport eq 'itiva';
my $letter = parse_letter( { letter_code => $letter_type,
borrowernumber => $upcoming->{'borrowernumber'},
branchcode => $branchcode,
@ -598,6 +600,7 @@ sub send_digests {
}
foreach my $transport ( keys %{ $borrower_preferences->{'transports'} } ) {
next if $transport eq 'itiva';
my $letter = parse_letter(
{
letter_code => $params->{letter_code},

View File

@ -712,6 +712,7 @@ END_SQL
my $print_sent = 0; # A print notice is not yet sent for this patron
for my $mtt ( @message_transport_types ) {
next if $mtt eq 'itiva';
my $effective_mtt = $mtt;
if ( ($mtt eq 'email' and not scalar @emails_to_use) or ($mtt eq 'sms' and not $data->{smsalertnumber}) ) {
# email or sms is requested but not exist, do a print.