[Koha-bugs] [Bug 15543] Use another notice in membership_expiry.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 20 15:45:32 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15543

Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #46766|0                           |1
        is obsolete|                            |

--- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> ---
Created attachment 50459
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50459&action=edit
[SIGNED-OFF] Bug 15543: Use another notice in membership_expiry.pl

This patch adds a letter parameter to the cron job membership_expiry.
It is used to substitute the default notice by another one.
This could be handy if you e.g. send a reminder after the first notice.
In any case, it allows for more flexibility.

Apart from this new parameter, this patch removes the sub parse_letter from
the code. The call to GetPreparedLetter is moved to the for loop and the
call to getletter is removed (no longer needed). If there is no letter
found, the Letter module already warns you. So we just exit the loop.

Test plan:
[1] Run membership_expiry.pl -c -n -v -let NOT_EXIST
    Check if you see a warning (coming from Letters.pm)
[2] Check if you have some soon expiring patrons or add before/after
    parameter to include some.
    Run membership_expiry.pl -c -n -v [-before ?] [-after ?]
[3] Create a new notice MEMBERSHIP2. Copy the text from the original notice
    and make some adjustments.
[4] Run membership_expiry.pl -c -v -let MEMBERSHIP2 [-before ?] [-after ?].
    Be aware that this call generates email messages.
    Verify that the email contained the adjusted text.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>

On top of Bug 14834
Work as described, tested using '-n' to see messages on terminal, e.g.
membership_expiry.pl -v -n -c -before 3 -branch BC -after 2 --letter MEMEXP2
No errors

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list