Bugzilla – Attachment 49875 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: Fix regression from bug 14133 - notify the library if patron is not
PASSED-QA-Bug-15967-Fix-regression-from-bug-14133-.patch (text/plain), 3.50 KB, created by
Katrin Fischer
on 2016-04-04 20:51:10 UTC
(
hide
)
Description:
[PASSED QA] Bug 15967: Fix regression from bug 14133 - notify the library if patron is not
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-04-04 20:51:10 UTC
Size:
3.50 KB
patch
obsolete
>From 1507851eed0323730ab94c819a29e7f283c4ba4b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 Mar 2016 08:58:06 +0000 >Subject: [PATCH] [PASSED QA] Bug 15967: Fix regression from bug 14133 - notify > the library if patron is not > >Regression introduced by bug 14133, see but 14133 comment 13. > >Test plan: >Without this patch applied, if a patron cannot be notified (no email >address or sms number), the print notice generated for the library was >not. >With this patch applied, the print notice should be generated using the >print template > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > misc/cronjobs/overdue_notices.pl | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index f77e3bb..7b5de19 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -670,10 +670,10 @@ END_SQL > > my $print_sent = 0; # A print notice is not yet sent for this patron > for my $mtt ( @message_transport_types ) { >- >+ my $effective_mtt = $mtt; > 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'; >+ $effective_mtt = 'print'; > } > my $letter = parse_overdues_letter( > { letter_code => $overdue_rules->{"letter$i"}, >@@ -685,7 +685,7 @@ END_SQL > 'items.content' => $titles, > 'count' => $itemcount, > }, >- message_transport_type => $mtt, >+ message_transport_type => $effective_mtt, > } > ); > unless ($letter) { >@@ -745,19 +745,19 @@ END_SQL > } > ); > } >- unless ( $mtt eq 'print' and $print_sent == 1 ) { >+ unless ( $effective_mtt eq 'print' and $print_sent == 1 ) { > # Just sent a print if not already done. > C4::Letters::EnqueueLetter( > { letter => $letter, > borrowernumber => $borrowernumber, >- message_transport_type => $mtt, >+ message_transport_type => $effective_mtt, > from_address => $admin_email_address, > to_address => join(',', @emails_to_use), > } > ); > # A print notice should be sent only once per overdue level. > # Without this check, a print could be sent twice or more if the library checks sms and email and print and the patron has no email or sms number. >- $print_sent = 1 if $mtt eq 'print'; >+ $print_sent = 1 if $effective_mtt eq 'print'; > } > } > } >-- >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