ical-expander icon indicating copy to clipboard operation
ical-expander copied to clipboard

Send only related exceptions for event creation

Open jrdaepi opened this issue 3 years ago • 5 comments

With version 3.1.0, when an event was created all exceptions would exist under each event. This caused issues for me when there were recurrences with the same start times. The updated code passes in only the exceptions related to this particular UID.

jrdaepi avatar Dec 30 '20 15:12 jrdaepi

Coverage Status

Coverage increased (+0.3%) to 97.345% when pulling efb22baaa48e56f1f11d1817070fa010dab4e469 on jrdaepi:master into 6af4f8bea75afa7ec8bbad87ac898b1e286ef380 on mifi:master.

coveralls avatar Dec 30 '20 15:12 coveralls

When will there be recurrences with the same start times? do you have an example ics?

mifi avatar Jan 09 '21 21:01 mifi

Sorry, my explanation could have been better. I meant the calendar has two separate recurring events that happen to have some start times that are at the same time (My customers typically are using events calendars, so they may have tennis and minigolf events that start at the same time and on the same calendar).

If one of these events has an exception goofy things happen because the recurrence-id is based on the timestamp. Without my change, all exceptions belong to every event. If you limit the exceptions to only the ones with the correct UID, then the exceptions will refer to the correct event.

Using the attached events.ics (Which has two events with the same recurring schedule, but one of the Weekly Men's Ladder has an exception for a change in the description), with the current code, I process the calendar for the next month and I see: 1 Event for "Weekly Men’s Ladder" 3 Occurrences for "Weekly Men’s Ladder" 2 Occurrences for "Second Event"

With my updated code there is: 1 Event for "Weekly Men’s Ladder" 2 Occurrences for "Weekly Men’s Ladder" 3 Occurrences for "Second Event"

events.zip

jrdaepi avatar Jan 09 '21 23:01 jrdaepi

Ok cool. I think we should have some tests for this.

mifi avatar Jan 24 '21 17:01 mifi

@jrdaepi, this seems legit. Could you share the ics file where this edge-case occurs?

bas080 avatar Jan 14 '22 14:01 bas080