]> git.koha-community.org Git - koha.git/commit
Bug 18697: Fix date calculations for weekly frequencies in Serials
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 30 May 2017 13:01:52 +0000 (15:01 +0200)
committerKatrin Fischer <katrin.fischer.83@web.de>
Thu, 29 Jun 2017 20:36:32 +0000 (22:36 +0200)
commite3a5b725c8bb656bc2c965e6caa3218076c44e80
treecb27cdcc4d6bf70606f7b96247448775e416a7c8
parent3776f59601b5277daca1a55ddfeb37da67cdc818
Bug 18697: Fix date calculations for weekly frequencies in Serials

Same solution applied as in bug 18356/18607. Consistency++

The code in _get_next_date_week is again very similar to the code in
_get_next_date_month or _get_next_date_year. I will not merge them here,
but we could consider that in the future.

Code in GetFictiveIssueNo has been adjusted similarly to month and year.

Test plan:
[1] Do not apply this patch. Create a subscription for 3/week.
    When the first issue date is on a Saturday or Sunday, the
    intervals in the prediction pattern are 0,0,7,0,0,7,etc.
    Starting on Wed-Fri 1,1,5,etc. Starting on Mon-Tue 2,2,3,etc.
[2] Apply this patch. Check again.
    The interval should be always 2,2,3 now and no longer depend on the
    day_of_week of first issue date.
[3] Check another weekly frequency with multiple units per issue.
    Say 1 issue/3 weeks.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ffb1c87d2962b19a07798da3bf81bef328270145)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dae1a7ccdf49b8d99748a659c6fff80185980e7f)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
C4/Serials.pm