Bugzilla – Attachment 91693 Details for
Bug 23357
overdue_notices.pl can send library doubled emails for patrons with no email/sms if both transports enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23357: Check if generating a duplicate print notice before generating notice
Bug-23357-Check-if-generating-a-duplicate-print-no.patch (text/plain), 4.55 KB, created by
Nick Clemens (kidclamp)
on 2019-07-22 13:46:24 UTC
(
hide
)
Description:
Bug 23357: Check if generating a duplicate print notice before generating notice
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-07-22 13:46:24 UTC
Size:
4.55 KB
patch
obsolete
>From 485fb0efbe1d93dd71a46bebbb579e031c201b92 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 22 Jul 2019 13:41:21 +0000 >Subject: [PATCH] Bug 23357: Check if generating a duplicate print notice > before generating notice > >To test: > 1 - Check out an overdue to a patron > 2 - Set a notice trigger for the same number of days overdue for the patrons patron type > 3 - Set the trigger to send via email and sms > You may need to define SMSSendDriver preference to enable SMS, you can put 'Email' > 4 - perl misc/cronjobs/overdue_notices.pl -v -t > 5 - Check the patrons record, 1 notice generated > 6 - Check the db: > SELECT * FROM message_queue; > 7 - Note the message 'Overdue notices' contains a doulbed content for the notice > 8 - DELETE * FROM message_queue; > 9 - Apply patch >10 - perl misc/cronjobs/overdue_notices.pl -v -t >11 - Chekc the patron's account, 1 message in 'Notices' >12 - Check the DB > SELECT * FROM message_queue; >13 - The 'Overdue notices' notice is not doubled >--- > misc/cronjobs/overdue_notices.pl | 40 ++++++++++++++++++++-------------------- > 1 file changed, 20 insertions(+), 20 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 75fd593c77..a134a12ea9 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -741,27 +741,27 @@ END_SQL > } > ); > } else { >- if ( ($mtt eq 'email' and not scalar @emails_to_use) or ($mtt eq 'sms' and not $data->{smsalertnumber}) ) { >- push @output_chunks, >- prepare_letter_for_printing( >- { letter => $letter, >- borrowernumber => $borrowernumber, >- firstname => $data->{'firstname'}, >- lastname => $data->{'surname'}, >- address1 => $data->{'address'}, >- address2 => $data->{'address2'}, >- city => $data->{'city'}, >- postcode => $data->{'zipcode'}, >- country => $data->{'country'}, >- email => $notice_email, >- itemcount => $itemcount, >- titles => $titles, >- outputformat => defined $csvfilename ? 'csv' : defined $htmlfilename ? 'html' : defined $text_filename ? 'text' : '', >- } >- ); >- } >+ # Just send a print only if not already done. > unless ( $effective_mtt eq 'print' and $print_sent == 1 ) { >- # Just sent a print if not already done. >+ if ( ($mtt eq 'email' and not scalar @emails_to_use) or ($mtt eq 'sms' and not $data->{smsalertnumber}) ) { >+ push @output_chunks, >+ prepare_letter_for_printing( >+ { letter => $letter, >+ borrowernumber => $borrowernumber, >+ firstname => $data->{'firstname'}, >+ lastname => $data->{'surname'}, >+ address1 => $data->{'address'}, >+ address2 => $data->{'address2'}, >+ city => $data->{'city'}, >+ postcode => $data->{'zipcode'}, >+ country => $data->{'country'}, >+ email => $notice_email, >+ itemcount => $itemcount, >+ titles => $titles, >+ outputformat => defined $csvfilename ? 'csv' : defined $htmlfilename ? 'html' : defined $text_filename ? 'text' : '', >+ } >+ ); >+ } > C4::Letters::EnqueueLetter( > { letter => $letter, > borrowernumber => $borrowernumber, >-- >2.11.0
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 23357
:
91693
|
100325
|
100634
|
100639