http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14834
--- Comment #3 from Marcel de Rooy <[email protected]> --- Created attachment 42650 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42650&action=edit Bug 14834: Add range parameters to membership_expiry cronjob The before/after parameter allows you to run the cronjob in an adjusted frequency (say once a week with before 7 or after 7). You can also run it again and pass before==1 to include the expires that should have been mailed yesterday, etc. Or use it to remind the patron more than once: if you choose for pref 14 and run weekly with before 7, the patron may receive two mails. While adding those two parameters, I decided to add a branch parameter too. The parameters are passed via a hashref. I decided to pass them on the command line and not via a preference. Why? Well, obviously the branch parameter is not suitable for a pref. The before/after parameter allows you to handle expiry mails different from the normal scheme or could be used in some sort of recovery. In those cases it will be more practical to use a command line parameter than editing a pref. (If needed, we could still add them and optionally override..) NOTE: The unit test has been adjusted for the above reasons, but I also added some lines to let existing expires not interfere with the added borrowers by an additional count and using the branchcode parameter. Test plan: [1] Run the adjusted unit test GetUpcomingMembershipExpires.t [2] Set the expiry date for patron A to now+16 (with pref 14). Set the expiry date for patron B to now+11. [3] Run the cronjob without range. You should not see A and B. [4] Run the cronjob with before 3. You should see patron B. [5] Run the cronjob with before 3 and after 2. You should see A and B. [6] Repeat step 5 with a branchcode that does not exist. No patrons. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
