Bug 30222: Simplify logic for reporting
authorNick Clemens <nick@bywatersolutions.com>
Fri, 11 Mar 2022 13:24:33 +0000 (13:24 +0000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 8 Apr 2022 13:45:16 +0000 (09:45 -0400)
commit17f1793ba952e3a95f98ec777d56486611b7036d
treecbe0601de3eb7a7d8d4ef4b31ff058b0eb3657fe
parent3fac0c7aee782f96867d2384422962b038c5f7aa
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/cronjobs/automatic_renewals.pl