Bugzilla – Attachment 49876 Details for
Bug 15967
Print notices are not generated if the patron cannot be notified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 15967: Use the email template if the print template does not exist
PASSED-QA-Bug-15967-Use-the-email-template-if-the-.patch (text/plain), 2.65 KB, created by
Katrin Fischer
on 2016-04-04 20:52:13 UTC
(
hide
)
Description:
[PASSED QA] Bug 15967: Use the email template if the print template does not exist
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-04-04 20:52:13 UTC
Size:
2.65 KB
patch
obsolete
>From eeb969c913c1826c50708a4c93fe3e1a7aa425c8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 4 Apr 2016 11:31:21 +0100 >Subject: [PATCH] [PASSED QA] Bug 15967: Use the email template if the print > template does not exist > >From commit 581759e985c170db0edb4a895cda641930e5ac11 > Bug 14133: 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? >""" > >Yes, it is what we want. But if the print template does not exist, the >notice is not generated, we'd like to get the email template instead. > >Test plan: >- Remove the print template for the letter you use for overdues >- Define an overdue rule to send an email >- Remove the email address for the patron which has overdues >- Execute the overdue_notices script >The staff should get an email notice and a print notice (using the >email template) should be generated for the patron > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > misc/cronjobs/overdue_notices.pl | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 7b5de19..06fec8f 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -675,6 +675,8 @@ END_SQL > # email or sms is requested but not exist, do a print. > $effective_mtt = 'print'; > } >+ >+ my $letter_exists = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, $effective_mtt ) ? 1 : 0; > my $letter = parse_overdues_letter( > { letter_code => $overdue_rules->{"letter$i"}, > borrowernumber => $borrowernumber, >@@ -685,7 +687,9 @@ END_SQL > 'items.content' => $titles, > 'count' => $itemcount, > }, >- message_transport_type => $effective_mtt, >+ # If there is no template defined for the requested letter >+ # Fallback on email >+ message_transport_type => $letter_exists ? $effective_mtt : 'email', > } > ); > unless ($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 15967
:
48605
|
48654
|
49844
|
49863
|
49875
| 49876