Summary: | Use another notice in membership_expiry.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Patrons | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | gmcharlt, kyle.m.hall, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 14834 | ||
Bug Blocks: | |||
Attachments: |
Bug 15543: Use another notice in membership_expiry.pl
[SIGNED-OFF] Bug 15543: Use another notice in membership_expiry.pl Bug 15543: Use another notice in membership_expiry.pl |
Description
Marcel de Rooy
2016-01-11 09:31:50 UTC
Created attachment 46766 [details] [review] 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. Created attachment 50459 [details] [review] [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@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 Created attachment 50914 [details] [review] 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@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 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for Koha 16.05. Thanks Marcel! |