main Koha release repository branch 17.05.x updated. v17.05.01-18-g07672a7

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

main Koha release repository branch 17.05.x updated. v17.05.01-18-g07672a7

Git repo owner
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, 17.05.x has been updated
       via  07672a77c666354578467c2a35c0f2ea7e512c73 (commit)
       via  1d30b33e7e7a352743208960efcf6f1f26a07853 (commit)
      from  15146ec2920caa464683e04798763cb2e3dac0e4 (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 07672a77c666354578467c2a35c0f2ea7e512c73
Author: Marcel de Rooy <[hidden email]>
Date:   Tue May 9 17:01:46 2017 +0200

    Bug 18356: Fix date calculations for yearly frequencies in Serials
   
    The problem as described on BZ 18356 is a combination of an error in
    GetFictiveIssueNumber and GetNextDate for unit==year.
   
    [1] In GetNextDate the Add_Delta_YM calculation should be applied only to
    frequencies based on years per unit.
    In the case of multiple units per year we calculate the number of days to
    add. And if we have reached the end of a cycle, we correct the
    rounding applied in the cycle.
    NOTE 1: We obsolete the idea here of rebasing dates on firstacqui. In case
    of manual adjustments, we probably do not want it. And otherwise we do not
    need it anymore due to the correction at the end of a cycle.
    NOTE 2: The calls to Add_Delta_YM are intentionally not corrected for leap
    years. Say you start at 2016-02-29. If you use 1/yr or 1/2yr, you will
    switch to the Feb 28th in the following years. In 2020 there will be no
    switch to Feb 29 again; if someone should need it, please use a manual
    adjustment. This is probably highly exceptional.
   
    [2] In GetFictiveIssueNumber the year should be decreased by one if you
    have more units per year and you did not yet reach firstacqui day and
    month. This affects calculations in GetNextDate with irregularities.
    NOTE 1: I added a wrapper around Date::Calc::N_Delta_YMD in order to improve
    its results; this will especially be needed when we use it later for
    month units.
    NOTE 2: In case of manual adjustments this calculation does not really make
    sense. Another report should deal with improving irregularities.
   
    Test plan:
    [1] Verify that both GetNextDate.t as well as GetFictiveIssueNumber.t pass.
    [2] Look at the prediction pattern for a few frequencies.
        For example: 1 iss/y, 1 iss/2y, 5 iss/y.
   
    Signed-off-by: Marcel de Rooy <[hidden email]>
   
    Signed-off-by: Josef Moravec <[hidden email]>
   
    Signed-off-by: Kyle M Hall <[hidden email]>
   
    Signed-off-by: Jonathan Druart <[hidden email]>
    (cherry picked from commit d71fb0e17c87a39fc5abe7c9b2d866636c244347)
    Signed-off-by: Fridolin Somers <[hidden email]>

commit 1d30b33e7e7a352743208960efcf6f1f26a07853
Author: Marcel de Rooy <[hidden email]>
Date:   Thu May 11 10:47:22 2017 +0200

    Bug 18356: Extend GetNextDate.t, add GetFictiveIssueNumber.t (unit=year)
   
    This patch deals with tests for yearly frequencies.
   
    Adjust/extend GetNextDate.t:
    [1] Adjust mixup of units/issues in a description.
    [2] Add testing +2 years on 29-2 of leap year for freq 1 issue/2 years.
    [3] Add tests for freq 9 issues/year.
   
    Add GetFictiveIssueNumber.t:
    [1] Two subtests are provided for irregular frequencies (very trivial) and
        for year frequencies (with four specific test cases).
   
    Test plan:
    [1] Run t/db_dependent/Serials/GetNextDate.t
    [2] Run t/db_dependent/Serials/GetFictiveIssueNumber.t
   
    Note: Without the second patch both tests should fail. This shows the need
    of the adjustments in the second patch.
   
    Signed-off-by: Marcel de Rooy <[hidden email]>
   
    Signed-off-by: Josef Moravec <[hidden email]>
   
    Signed-off-by: Kyle M Hall <[hidden email]>
   
    Signed-off-by: Jonathan Druart <[hidden email]>
    (cherry picked from commit 285f6bd945373c06633b2c42621d754d93c37903)
    Signed-off-by: Fridolin Somers <[hidden email]>

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

Summary of changes:
 C4/Serials.pm                                  |   57 +++++++++----
 t/db_dependent/Serials/GetFictiveIssueNumber.t |  104 ++++++++++++++++++++++++
 t/db_dependent/Serials/GetNextDate.t           |   47 +++++++++--
 3 files changed, 184 insertions(+), 24 deletions(-)
 create mode 100644 t/db_dependent/Serials/GetFictiveIssueNumber.t


hooks/post-receive
--
main Koha release repository
_______________________________________________
koha-commits mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-commits
Loading...