This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Opened 14 months ago

#1580 new defect

Event cloning with monthly interval fails

Reported by: aavilesd Owned by:
Priority: normal Milestone: v2.0
Component: General Version: 1.1
Keywords: Cc:

Description

Cloning an event with monthly intervals fails when the start date is set to the last day of a month with 31 days. This is caused by the way we iterate months: creating a new date object using the day of start_date. This happens both for Clone the event with a fixed interval and Clone the agenda on given days.

For example:
An event whose repetition starts a 31st October will fail when trying to compose the 31st of November.

The patch should be done using dateutil.rrule in both cases.

For the first type of repetitions we should keep the day of the month unless it doesn't exist for a particular month. In that case we will create the event on the last day of the month. i.e. January 31, February 28, March 31, ...

For the second type of repetitions we should make sure that we don't skip months that don't have 5th weekday and creating the event on the 4th weekday as a fallback. i.e. 5th Sunday of November, 4th Sunday of December, ... 5th Sunday of March.

Change History (0)

Note: See TracTickets for help on using tickets.