Bug 30667 - Holds reminder cronjob (holds_reminder.pl) never uses default letter template
Summary: Holds reminder cronjob (holds_reminder.pl) never uses default letter template
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Marcel de Rooy
URL:
Keywords:
: 28797 (view as bug list)
Depends on: 28514
Blocks: 30666
  Show dependency treegraph
 
Reported: 2022-05-03 10:53 UTC by Kyle M Hall
Modified: 2022-08-22 23:58 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00, 21.11.11


Attachments
Bug 30667: Holds reminder cronjob (holds_reminder.pl) never uses default letter template (1.82 KB, patch)
2022-05-03 10:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 30667: Holds reminder cronjob (holds_reminder.pl) never uses default letter template (1.87 KB, patch)
2022-05-04 02:45 UTC, David Nind
Details | Diff | Splinter Review
Bug 30667: Holds reminder cronjob (holds_reminder.pl) never uses default letter template (1.97 KB, patch)
2022-05-13 09:46 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2022-05-03 10:53:25 UTC
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.
Comment 1 Kyle M Hall 2022-05-03 10:58:19 UTC
Created attachment 134504 [details] [review]
Bug 30667: Holds reminder cronjob (holds_reminder.pl) never uses default letter template

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
Comment 2 David Nind 2022-05-04 02:45:11 UTC
Created attachment 134564 [details] [review]
Bug 30667: Holds reminder cronjob (holds_reminder.pl) never uses default letter template

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>
Comment 3 Marcel de Rooy 2022-05-13 09:44:28 UTC
Looking here
Comment 4 Marcel de Rooy 2022-05-13 09:46:58 UTC
Created attachment 134958 [details] [review]
Bug 30667: Holds reminder cronjob (holds_reminder.pl) never uses default letter template

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>
Comment 5 Fridolin Somers 2022-05-14 01:43:01 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 6 Evelyn Hartline 2022-07-08 14:17:20 UTC
Could this be backported to 21.11?
Comment 7 Katrin Fischer 2022-07-08 15:32:52 UTC
(In reply to evelyn from comment #6)
> Could this be backported to 21.11?

I've added the RMaint to CC
Comment 8 Liz Rea 2022-08-16 15:15:52 UTC
*** Bug 28797 has been marked as a duplicate of this bug. ***
Comment 9 Arthur Suzuki 2022-08-21 08:44:42 UTC
pushed to 21.11.x for 21.11.11
Comment 10 Victor Grousset/tuxayo 2022-08-22 23:58:45 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.