From bafcda2c2618e5fdc4f70cbcde8257fb5fd2cc5d 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 Signed-off-by: Jonathan Druart --- Koha/Patron.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 7f30fa7e82..322fc6a068 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1858,10 +1858,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.39.5