Bug 18455 - Holiday range has incorrect starting date when crossing a weekly holiday
Summary: Holiday range has incorrect starting date when crossing a weekly holiday
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Holidays (show other bugs)
Version: 16.11
Hardware: All All
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-19 11:00 UTC by Mark Alexander
Modified: 2019-06-27 09:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Screen shot of calendar after creation of two holidays mentioned in description. (83.05 KB, image/png)
2017-04-19 11:00 UTC, Mark Alexander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Alexander 2017-04-19 11:00:58 UTC
Created attachment 62359 [details]
Screen shot of calendar after creation of two holidays mentioned in description.

When a holiday of type "Holidays on a range" is created with a date range that overlaps a holiday of type "Holiday repeated every same day of the week", the starting date of the range is changed to a month or two earlier, creating a large number of incorrect holidays.

To reproduce:

Start with an empty calendar.

Create a holiday on a Wednesday and give it type "Holiday repeated every same day of the week".

Create a holiday on a Tuesday (e.g., May 2 2017) with an ending date of a Thursday (e.g., May 4 2017) and a type of "Holidays on a range".  This will create a set of single holidays starting on a day much earlier than the user-specified start date.  On my system (16.11.06.000) it created holidays starting on March 30 2017.

See attached screenshot for the result.
Comment 1 Katrin Fischer 2017-05-14 21:53:56 UTC
We have run into this repeatedly in a current project, but it was hard to come up with a test plan that would make this reproducable. Thx, Mark!

I am upping severity a bit, as this has actually led to circulation dying in one of the libraries that ran into this. Repeatable holidays holidays for every day of the year.
Comment 2 Katrin Fischer 2017-08-17 13:48:15 UTC
Hi Mark,

I've repeated your test plan with every available dateformat setting on master, but I am unable to reproduce the problem. 

Does it still happen for you?
Comment 3 Mark Alexander 2017-08-18 14:49:43 UTC
We have upgraded to 17.05.01, and the problem doesn't seem to happen any more.
Comment 4 Katrin Fischer 2017-08-18 15:21:16 UTC
Thx for the feedback Mark - I will close WORKSFORME. We can reopen if it manifests again.