Bugzilla – Attachment 189502 Details for
Bug 39646
Send overdue notice to guarantor when guarantee has no email
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39646: Send overdue notice to guarantor when guarantee has no email
Bug-39646-Send-overdue-notice-to-guarantor-when-gu.patch (text/plain), 2.33 KB, created by
Hammat wele
on 2025-11-11 23:13:56 UTC
(
hide
)
Description:
Bug 39646: Send overdue notice to guarantor when guarantee has no email
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-11-11 23:13:56 UTC
Size:
2.33 KB
patch
obsolete
>From c9a1d927a4059419c98eb817305b57470ed45507 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Tue, 11 Nov 2025 23:11:50 +0000 >Subject: [PATCH] Bug 39646: Send overdue notice to guarantor when guarantee > has no email > >Test plan: >1. Have a patron with no email address and an overdue item. >2. Add a guarantor to this patron. The guarantor must have an email > address. >3. Enable the system preference RedirectGuaranteeEmail. >4. Set up overdue notice/status triggers > 4.1 Go to tools -> Overdue notice/status triggers > 4.2 For Default library > - Delay: 1 > - Letter: Overdue notice (ODUE) > - Email: selected >5. Run ./misc/cronjobs/overdue_notices.pl. >6. In the staff interface, go to the guarantee patron > Notices. > ---> Notice that only a print notice has been created. >7. Apply the patch. >8. Repeat steps 4 and 5. > ---> Notice that an email message has been created. > You can also verify in SQL > Select message_transport_type,to_address from message_queue where letter_code = 'ODUE' and borrowernumber = <borroewrnumber> >9. Run the script process_message_queue.pl. > ---> Verify that the email has been sent to the guarantor's address. >--- > misc/cronjobs/overdue_notices.pl | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 6e4aa782184..d0777be2918 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -753,6 +753,18 @@ END_SQL > unless @message_transport_types; > > my $print_sent = 0; # A print notice is not yet sent for this patron >+ >+ if ( C4::Context->preference('RedirectGuaranteeEmail') && $patron ) { >+ >+ # Get guarantor addresses >+ my $guarantor_relationships = $patron->guarantor_relationships; >+ my @guarantors = $guarantor_relationships->guarantors->as_list; >+ foreach my $guarantor (@guarantors) { >+ my $address = $guarantor->notice_email_address; >+ push( @emails_to_use, $address ) if ($address); >+ } >+ } >+ > for my $mtt (@message_transport_types) { > next if $mtt eq 'itiva'; > my $effective_mtt = $mtt; >-- >2.34.1
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 39646
:
180995
| 189502