[Koha-bugs] [Bug 18356] Prediction pattern wrong, skips years, for some year based frequencies

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 15 15:12:08 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18356

--- Comment #3 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 63471
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63471&action=edit
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.

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.

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 year cycle, we 'round' up to
firstacqui day and month as long as we are close enough. Otherwise we just
add the number of calculated days, since we can safely assume that the
publish dates have been adjusted manually.

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 <m.de.rooy at rijksmuseum.nl>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list