Bugzilla – Attachment 134958 Details for
Bug 30667
Holds reminder cronjob (holds_reminder.pl) never uses default letter template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30667: Holds reminder cronjob (holds_reminder.pl) never uses default letter template
Bug-30667-Holds-reminder-cronjob-holdsreminderpl-n.patch (text/plain), 1.97 KB, created by
Marcel de Rooy
on 2022-05-13 09:46:58 UTC
(
hide
)
Description:
Bug 30667: Holds reminder cronjob (holds_reminder.pl) never uses default letter template
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-05-13 09:46:58 UTC
Size:
1.97 KB
patch
obsolete
>From e19480f2d507ce6388bf16ae61290cecb050fd20 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Tue, 3 May 2022 06:53:43 -0400 >Subject: [PATCH] Bug 30667: Holds reminder cronjob (holds_reminder.pl) never > uses default letter template >Content-Type: text/plain; charset=utf-8 > >Bug 28514 changed the way holds_reminder.pl searches for templates, using a direct search for letters, >but should be using find_effective_template instead. Now, if a branch specific template does not exist, >it will skip that branch. > >Test Plan: >1) Ensure you only have the default HOLD_REMINDER template >2) Become the koha user using koha-shell >3) Run misc/cronjobs/holds/holds_reminder.pl --days 7 -v >4) Note that the script skips every branch >5) Apply this patch >6) Run the command in step 3 again >7) Note the script doesn't skip over any branches > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/cronjobs/holds/holds_reminder.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/holds/holds_reminder.pl b/misc/cronjobs/holds/holds_reminder.pl >index c0fabb2017..f580cd7374 100755 >--- a/misc/cronjobs/holds/holds_reminder.pl >+++ b/misc/cronjobs/holds/holds_reminder.pl >@@ -228,14 +228,14 @@ foreach my $branchcode (@branchcodes) { #BEGIN BRANCH LOOP > # Check that this branch has the letter code specified or skip this branch > > # FIXME What if we don't want to default if the translated template does not exist? >- my $template_exists = Koha::Notice::Templates->search( >+ my $template_exists = Koha::Notice::Templates->find_effective_template( > { > module => 'reserves', > code => $lettercode, > branchcode => $branchcode, > lang => 'default', > } >- )->count; >+ ); > unless ($template_exists) { > $verbose and print qq|Message '$lettercode' content not found for $branchcode\n|; > next; >-- >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 30667
:
134504
|
134564
| 134958