From 29ecb276369f8a5b37ccec921d04c825d7814322 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 24 Mar 2021 11:40:09 +0000 Subject: [PATCH] Bug 15986: (QA follow-up) Account for bugs 25333 and 25334 Bug 25333 changed the existing 'phone' message transport type to 'itiva' and bug 25334 added a new 'phone' message transport type. Signed-off-by: Martin Renvoize --- Koha/Patron.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index c81911b15e..a10a8a21a7 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1841,10 +1841,13 @@ sub queue_notice { my $print_sent = 0; my %return; foreach my $mtt (@message_transports){ - next if ($mtt eq 'phone' and C4::Context->preference('TalkingTechItivaPhoneNotification') ); - # Phone notices are handled by TalkingTech_itiva_outbound.pl - if( ($mtt eq 'email' and not $self->notice_email_address) or ($mtt eq 'sms' and not $self->smsalertnumber) ){ - push @{$return{fallback}}, $mtt; + next if ($mtt eq 'itiva' and C4::Context->preference('TalkingTechItivaPhoneNotification') ); + # Notice is handled by TalkingTech_itiva_outbound.pl + if ( ( $mtt eq 'email' and not $self->notice_email_address ) + or ( $mtt eq 'sms' and not $self->smsalertnumber ) + or ( $mtt eq 'phone' and not $self->phone ) ) + { + push @{ $return{fallback} }, $mtt; $mtt = 'print'; } next if $mtt eq 'print' && $print_sent; -- 2.20.1