Bug 30222: Simplify logic for reporting
authorNick Clemens <nick@bywatersolutions.com>
Fri, 11 Mar 2022 13:24:33 +0000 (13:24 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 4 Apr 2022 14:23:45 +0000 (16:23 +0200)
commit3e4f9cd578f54a162c72137a4ad2bd4948b6b3d9
tree21005a23ea4466f9d5d8be46dcc1b898a7fabc99
parent641011806df9b25881a4839334855c8d5c811fcd
Bug 30222: Simplify logic for reporting

This patch adds two new variables:
$wants_email and $wants digest

These are used to simplify checks on whether notices should be sent

To test:
1 - Apply patch
2 - Confirm notices are not sent of pref is 'cron' and send_notcies flag not set
3 - Confirm notices are sent if pref is cron and send_notices flag is set and borrower
    does not have preference set for auto renewals
4 - Confirm notices not sent if pref is set to follow messaging preference and borrower
    does not have preferences set for auto_renewals
5 - Confirm regular notices sent if pref is set to follow messaging preferences and borrower
    does have the preference set but not digest
6 - Confirm digest notices sent if pref is set to follow messaging preferences and borrower
    does have the preference set and wants digest

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
misc/cronjobs/automatic_renewals.pl