Bugzilla – Attachment 46085 Details for
Bug 14133
Print notices generated in special case do not use print template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14133: Print notices should be generated with the print template
Bug-14133-Print-notices-should-be-generated-with-t.patch (text/plain), 3.07 KB, created by
Sophie MEYNIEUX
on 2015-12-30 14:46:59 UTC
(
hide
)
Description:
Bug 14133: Print notices should be generated with the print template
Filename:
MIME Type:
Creator:
Sophie MEYNIEUX
Created:
2015-12-30 14:46:59 UTC
Size:
3.07 KB
patch
obsolete
>From aba04d7c36e9f2ba89436917a1d75bb71e3692d2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 21 Aug 2015 10:43:13 +0100 >Subject: [PATCH] Bug 14133: Print notices should be generated with the print > template > >If the overdue notice to send is an email or a SMS and the patron does >not provided such information, a print notice is generated. >But it will be generated with the email or sms template, which is not >useful, especially in the SMS case. > >The template to use should be the print one. > >Test plan: >0/ Does not apply this patch and Correctly define the overdue rules to generate >an overdue notice to the message_queue table. >Check email + SMS >1/ Define an email address and a SMS number for a patron >2/ Generate the overdue notices (misc/cronjobs/overdue_notices.pl [-t]) >3/ 2 notices should have been generated: > mtt=email with the email template used > mtt=sms with the sms template used >4/ Truncate the message_queue table >5/ Remove the email address and repeat 2 >6/ Only 1 notice should have been generated: > mtt=print with the email template used >7/ Truncate the message_queue table >8/ Remove the sms alert number and repeat 2 >9/ 2 notices should have been generated: > mtt=print with the email template used (or sms I suppose) > >10/ Apply this patch and repeat previous steps. >The print notices should be generated with the print template. > >IMPORTANT NOTE: This test plan does not take into account the notices >generated for the staff ("These messages were not sent directly to the >patrons."). However the behavior will also change, the print template >will be used in all cases. Is it what we want? >--- > misc/cronjobs/overdue_notices.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 98b0a25..e184edb 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -674,6 +674,10 @@ END_SQL > my $print_sent = 0; # A print notice is not yet sent for this patron > for my $mtt ( @message_transport_types ) { > >+ if ( ($mtt eq 'email' and not scalar @emails_to_use) or ($mtt eq 'sms' and not $data->{smsalertnumber}) ) { >+ # email or sms is requested but not exist, do a print. >+ $mtt = 'print'; >+ } > my $letter = parse_overdues_letter( > { letter_code => $overdue_rules->{"letter$i"}, > borrowernumber => $borrowernumber, >@@ -726,8 +730,6 @@ END_SQL > ); > } else { > if ( ($mtt eq 'email' and not scalar @emails_to_use) or ($mtt eq 'sms' and not $data->{smsalertnumber}) ) { >- # email or sms is requested but not exist, do a print. >- $mtt = 'print'; > push @output_chunks, > prepare_letter_for_printing( > { letter => $letter, >-- >1.9.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 14133
:
41765
|
46085
|
46167
|
46452