Bug 6810: Send membership expiry reminder notices.
authorAmit Gupta <amitddng135@gmail.com>
Tue, 8 Oct 2013 08:20:51 +0000 (13:50 +0530)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 6 Oct 2015 14:13:08 +0000 (11:13 -0300)
commit764b8b7e905e541a8e6de65a94f2ceed0fdef111
tree650da0b8035cd917876875497ce4c7ba5e6a7637
parent226a10232a6c43e1bbbaaa3f0ce7a4066eda9e48
Bug 6810: Send membership expiry reminder notices.

A new crontab based perl script to send membership expiry reminders. A
system preference controls the number of days in advance of membership
expiry that the notices will be sent on.

To Test:
1) Create a new Patron and set membership expiry date 14 days from the
   date of registration.
2) Check your systemprefence ( MemExpDayNotice to 14 days default value)
3) Manual testing Run ( perl membership_expiry.pl -h)
    It would give you various option:
    This script prepares for membership expiry reminders to be sent to
    patrons. It queues them in the message queue, which is processed by
    the process_message_queue.pl cronjob.
    See the comments in the script for directions on changing the script.
    This script has the following parameters :
     -c Confirm and remove this help & warning
     -n send No mail. Instead, all mail messages are printed on screen.
        Useful for testing purposes.
     -v verbose
    Do you wish to continue? (y/n)
4) Choose option for ex: perl membership_expiry.pl -c
5) Go to your koha database and check message_queue table you see some
   results.
6) Run (perl process_message_queue.pl) it will send email to those
   patron whose membership after 14 days from today.
7) Cron testing: (10   1 * * *  $KOHA_CRON_PATH/membership_expiry.pl -c)
8) Set your 15   * * * *  $KOHA_CRON_PATH/process_message_queue.pl
9) After running membership_expiry.pl, (process_message_queue.pl will
   send emails to those patron whose membership after 14 days from
   today).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Letters.pm
C4/Members.pm
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
misc/cronjobs/membership_expiry.pl [new file with mode: 0755]