Bugzilla – Attachment 109837 Details for
Bug 26420
Overdue notices script does not care about borrower's language, always takes default template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26420: Use translated notices for overdue_notices.pl
Bug-26420-Use-translated-notices-for-overduenotice.patch (text/plain), 2.20 KB, created by
Jonathan Druart
on 2020-09-10 08:41:03 UTC
(
hide
)
Description:
Bug 26420: Use translated notices for overdue_notices.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-09-10 08:41:03 UTC
Size:
2.20 KB
patch
obsolete
>From 5564a0e3ba89126a39415d4dcd8199ff3692dff8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 10 Sep 2020 09:42:58 +0200 >Subject: [PATCH] Bug 26420: Use translated notices for overdue_notices.pl > >This script does not pass the patron's preferred lang for notices. > >Test plan: >Enable TranslateNotices >Create a patron with a preferred lang for notices != default >Translate ODUE for this language >Setup the overdue notices for this patron's category >Check an item out for this patron (select the correct due date to >trigger the notice) >Run the script overdue_notices.pl >Check the message_queue table and confirm that the notice enqueued is >translated >--- > misc/cronjobs/overdue_notices.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 2d6a5bb397..01200d8435 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -598,7 +598,7 @@ END_SQL > } > } > >- my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode ); >+ my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, undef, $patron->lang ); > > unless ($letter) { > $verbose and warn qq|Message '$overdue_rules->{"letter$i"}' content not found|; >@@ -689,7 +689,7 @@ END_SQL > splice @items, $PrintNoticesMaxLines if $effective_mtt eq 'print' && $PrintNoticesMaxLines && scalar @items > $PrintNoticesMaxLines; > #catch the case where we are sending a print to someone with an email > >- my $letter_exists = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, $effective_mtt ) ? 1 : 0; >+ my $letter_exists = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"}, $branchcode, $effective_mtt, $patron->lang ) ? 1 : 0; > my $letter = parse_overdues_letter( > { letter_code => $overdue_rules->{"letter$i"}, > borrowernumber => $borrowernumber, >-- >2.20.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 26420
:
109837
|
110036
|
110123