https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43380 Bug ID: 43380 Summary: Koha will generate spurious print notices if itiva is enabled and a patron has only selected phone notices Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@openfifth.co.uk Target Milestone: --- If a patron only has itiva notices enabled ( and possibly sometimes with other transports enabled, depending on sorting ), Koha will always generate a print notice for them. Take this excerpt from Reserves.pm: 2086 while ( my ( $mtt, $letter_code ) = each %{ $messagingprefs->{transports} } ) { 2087 if ( 2088 ( $mtt eq 'email' and not $to_address ) # No email address 2089 or ( $mtt eq 'sms' and not $patron->smsalertnumber ) # No SMS number 2090 or ( $mtt eq 'itiva' 2091 and C4::Context->preference('TalkingTechItivaPhoneNotification') 2092 ) # Notice is handled by TalkingTech_itiva_outbound.pl 2093 or ( $mtt eq 'phone' and not $patron->phone ) # No phone number to call 2094 ) 2095 { 2096 unless ($notification_sent) { 2097 $notification_sent++; 2098 &$send_notification( 'print', 'HOLD' ); 2099 } 2100 next; 2101 } 2102 2103 &$send_notification( $mtt, $letter_code, $messagingprefs->{wants_digest} ); 2104 } 2105 } Lines 2090/2091 will always be true if itiva is enabled. If the patron has only itiva enabled ( or itiva happens to be the first transport handled in the loop ), the value check at line 2096 will always be false, and thus the call to send_notification for the print version will be triggered at line 2098. It seems that we should replace lines 2090/2091 with something like: or ( ( $mtt eq 'itiva' and !C4::Context->preference('TalkingTechItivaPhoneNotification') ) or ( $mtt eq 'itiva' and not $patron->phone ) ) so if they are to be sent an itiva notice but itiva is not enabled, or itiva *is* enabled but they don't have a voice phone number set, *then* send the print notice. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.