Bug 29704: Add a triggered option to holds_reminder.pl
authorNick Clemens <nick@bywatersolutions.com>
Fri, 17 Dec 2021 15:49:17 +0000 (15:49 +0000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 4 Feb 2022 19:20:39 +0000 (14:20 -0500)
commitb392547ab6937abafcd2e964f9d7490f1426a51c
tree5d5b02d92ef4b4c949664e8f6a1804b66643b3ee
parentc396db60d22635e4992b4805e9afcc0f7217b971
Bug 29704: Add a triggered option to holds_reminder.pl

This patch adds an option to only trigger notices matching the number of
days waiting specified

You will need to define HOLD_REMINDER notices for the specific branch of the
patron and ensure the patron has hold reminder notices in their messaging preferences

TO test:
1 - Place a hold for a patron and check in to confirm
2 - Set the waiting date back a few days:
    update reserves set waitingdate = DATE_SUB(CURDATE(), INTERVAL 5 DAY);
3 - Run the cron and see that patron would be notified if running for 4 days weaiting
    perl misc/cronjobs/holds/holds_reminder.pl -v --days 4
4 - Apply patch
5 - perl misc/cronjobs/holds/holds_reminder.pl -v --days 4 --triggered
6 - Note patron would not be notified
7 - perl misc/cronjobs/holds/holds_reminder.pl -v --days 5 --triggered
8 - Note patron is notified when days waiting matches exactly

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/cronjobs/holds/holds_reminder.pl