Bug 31487 - Add emails to message queue by longoverdue script options
Summary: Add emails to message queue by longoverdue script options
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords: no-sandbox
: 27441 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-08-30 08:29 UTC by Thibaud Guillot (thibaud_g)
Modified: 2025-01-14 16:49 UTC (History)
9 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 24857: No words (879 bytes, text/plain)
2022-08-30 09:59 UTC, Thibaud Guillot (thibaud_g)
Details
Bug 31487: Add an option to send by mail longoverdue items to borrowers (5.55 KB, patch)
2022-08-30 10:01 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review
Bug 31487: Add an option to send by mail longoverdue items to borrowers (5.62 KB, patch)
2022-08-30 10:09 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review
Bug 31487: Add an option to send by mail longoverdue items to borrowers (5.78 KB, patch)
2025-01-10 10:08 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Thibaud Guillot (thibaud_g) 2022-08-30 08:29:14 UTC
Some customers request the possibility of sending an additional reminder when processing longoverdues. I think this may be useful for some and given that it remains an option, it does not handicap those who do not want to use it.
Comment 1 Thibaud Guillot (thibaud_g) 2022-08-30 09:59:45 UTC
Created attachment 139975 [details]
Bug 24857: No words

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Thibaud Guillot (thibaud_g) 2022-08-30 10:00:38 UTC Comment hidden (obsolete)
Comment 3 Thibaud Guillot (thibaud_g) 2022-08-30 10:01:53 UTC Comment hidden (obsolete)
Comment 4 Thibaud Guillot (thibaud_g) 2022-08-30 10:09:00 UTC
Created attachment 139977 [details] [review]
Bug 31487: Add an option to send by mail longoverdue items to borrowers

Test plan:
1) You must have longoverdue items to one or many borrowers
2) You must create a notice template (Notices & slips section)
3) You can run the script misc/cronjobs/longoverdue.pl manually without
--mail option first (see -h or --help for more info about the script)
4) You must see an output with some longoverdues (step 1 required)
5) Now you can run the script with --mail option but like its specify in
"help" option you must add option --code="" (relative to your code
template) and --branchcode="".
6) Normally you will see after the classic output a new block with
emails added to the message queue and it will be sent on the next misc/cronjobs/process_message_queue.pl script iteration
Comment 5 Thibaud Guillot (thibaud_g) 2022-08-30 10:11:23 UTC Comment hidden (obsolete)
Comment 6 Lucas Gass (lukeg) 2024-02-15 21:45:55 UTC
No longer applies to current master.
Comment 7 Eric Swenson 2024-12-20 15:55:38 UTC
This would be a beneficial feature for many of our library partners that are not open 7 days a week. Since they use useDaysMode to push back the due dates of items this makes timing the notice of items becoming long overdue very difficult.
Comment 8 Thibaud Guillot (thibaud_g) 2025-01-10 10:08:27 UTC
Created attachment 176318 [details] [review]
Bug 31487: Add an option to send by mail longoverdue items to borrowers

Test plan:
1) You must have longoverdue items to one or many borrowers
2) You must create a notice template (Notices & slips section)
3) You can run the script misc/cronjobs/longoverdue.pl manually without
--mail option first (see -h or --help for more info about the script)
4) You must see an output with some longoverdues (step 1 required)
5) Now you can run the script with --mail option but like its specify in
"help" option you must add option --code="" (relative to your code
template) and --branchcode="".
6) Normally you will see after the classic output a new block with
emails added to the message queue and it will be sent on the next misc/cronjobs/process_message_queue.pl script iteration

Sponsored by: BibLibre
Comment 9 Andrew Fuerste-Henry 2025-01-14 15:19:42 UTC
This needs to use GetPreparedLetter. It also needs to include a default notice.

GetPreparedLetter would allow this to determine which branch to use, rather than asking for a branch in the cron. Specifying a branchcode in the cron really will not work for a variety of consortial setups. We need this to use something more like the overdue cron's --frombranch  flag, which tells koha to use either the issuing library or the owning library.

The "--mail" flag seems superfluous if adding "--mail" means "--code" and "--branch" are then required.

Does this currently have any ability to pull in variables, like the patron name? It does not seem to, and that seems like a minimum functionality requirement.

Ultimately, this wants: 
- to be a patron messaging preference
- to generate a Print notice when the patron lacks an email address
- to allow SMS message transport stuff
- to allow digests

I think some of that would be accomplished by using GetPreparedLetter. The rest could be follow-ups.

(In reply to Thibaud Guillot (thibaud_g) from comment #8)
> Created attachment 176318 [details] [review] [review]
> Bug 31487: Add an option to send by mail longoverdue items to borrowers
> 
> Test plan:
> 1) You must have longoverdue items to one or many borrowers
> 2) You must create a notice template (Notices & slips section)
> 3) You can run the script misc/cronjobs/longoverdue.pl manually without
> --mail option first (see -h or --help for more info about the script)
> 4) You must see an output with some longoverdues (step 1 required)
> 5) Now you can run the script with --mail option but like its specify in
> "help" option you must add option --code="" (relative to your code
> template) and --branchcode="".
> 6) Normally you will see after the classic output a new block with
> emails added to the message queue and it will be sent on the next
> misc/cronjobs/process_message_queue.pl script iteration
> 
> Sponsored by: BibLibre
Comment 10 Andrew Fuerste-Henry 2025-01-14 16:26:55 UTC
*** Bug 27441 has been marked as a duplicate of this bug. ***