Bugzilla – Attachment 192621 Details for
Bug 40960
Only generate a notice for patrons about holds filled if they have set messaging preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40960: Print notification only if selected type is impossible
700b43e.patch (text/plain), 2.36 KB, created by
Kyle M Hall (khall)
on 2026-02-06 14:36:35 UTC
(
hide
)
Description:
Bug 40960: Print notification only if selected type is impossible
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2026-02-06 14:36:35 UTC
Size:
2.36 KB
patch
obsolete
>From 700b43ea32287c77da26909ff929e321e1c70162 Mon Sep 17 00:00:00 2001 >From: Baptiste <baptiste.wojtkowski@biblibre.com> >Date: Mon, 6 Oct 2025 11:45:10 +0200 >Subject: [PATCH] Bug 40960: Print notification only if selected type is > impossible > >Test plan (ktd): >1 - Have henry acevedo have no mail and set messaging preference "Hold filled to sms" >2 - Have edna acosta have not messaging preference >3 - Place an hold on two books for edna acosta and henry acevedo, check in both books and select the button to fill the hold >4 - Check in notices and see that both received a notice >5 - Apply tests and run tests -> they should fail >6 - Apply patch, run rest -> they should pass >7 - Unfill both holds and fill them back. Henry should keep receiving notices while Edna should not anymore. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Reserves.pm | 19 +++++++++---------- > 1 file changed, 9 insertions(+), 10 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 45adc250486..25c3445c5e0 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -2057,25 +2057,24 @@ sub _koha_notify_reserve { > }; > > while ( my ( $mtt, $letter_code ) = each %{ $messagingprefs->{transports} } ) { >- next >- if ( >+ if ( > ( $mtt eq 'email' and not $to_address ) # No email address > or ( $mtt eq 'sms' and not $patron->smsalertnumber ) # No SMS number > or ( $mtt eq 'itiva' > and C4::Context->preference('TalkingTechItivaPhoneNotification') > ) # Notice is handled by TalkingTech_itiva_outbound.pl > or ( $mtt eq 'phone' and not $patron->phone ) # No phone number to call >- ); >+ ) >+ { >+ unless ($notification_sent) { >+ $notification_sent++; >+ &$send_notification( 'print', 'HOLD' ); >+ } >+ next; >+ } > > &$send_notification( $mtt, $letter_code, $messagingprefs->{wants_digest} ); >- $notification_sent++; >- } >- >- #Making sure that a print notification is sent if no other transport types can be utilized. >- if ( !$notification_sent ) { >- &$send_notification( 'print', 'HOLD' ); > } >- > } > > =head2 _koha_notify_hold_changed >-- >2.50.1 (Apple Git-155) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40960
:
187669
|
187670
|
190758
|
190759
|
190763
|
190764
|
192620
| 192621