[koha-commits] main Koha release repository branch master updated. v3.22.00-1472-g51be8ec

Git repo owner gitmaster at git.koha-community.org
Fri Apr 29 18:48:38 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, master has been updated
       via  51be8ecd9d7a1d260fd2b1788cb6d54d8da53f31 (commit)
      from  8682a9f821a1ed9c3e27efe472dc172233c40a8f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 51be8ecd9d7a1d260fd2b1788cb6d54d8da53f31
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Thu Sep 17 10:25:50 2015 +0200

    Bug 14834: Make membership_expiry cronjob more flexible
    
    This patch adds three parameters to the cron job: -before and -after, and
    -branch.
    
    You can run the cronjob now in an adjusted frequency: say once a week with
    before 6 or after 6 (not both together). If your pref is set to 14, running
    before=6 will include expiries from 8 days to 14 days ahead. When you
    use after=6, you would include 14 days to 20 days ahead, etc.
    
    You could also rerun the job of yesterday by setting before=1 and after=-1;
    this could help in case of problem recovery.
    
    Obviously, the branch parameter can be used as a filter.
    
    NOTE: Why are these parameters passed only via the command line?
    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.
    
    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.
    
    Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
    Work as described following test plan.
    Test pass
    No errors
    
    New parameters work with one (-) or two(--) dashes, no problem
    with that but convention suggest that 'long' options use two-dashes.
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-----------------------------------------------------------------------

Summary of changes:
 C4/Members.pm                                      |   43 ++++++++---
 misc/cronjobs/membership_expiry.pl                 |   26 ++++++-
 .../Members/GetUpcomingMembershipExpires.t         |   79 +++++++++++---------
 3 files changed, 101 insertions(+), 47 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list