Skip to content

Conversation

@jrdaepi
Copy link

@jrdaepi jrdaepi commented Dec 30, 2020

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.

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.
When parsing invalid dates, passing in exceptions throws an exception. fall back to using parent when invalid dates are present.
@coveralls
Copy link

coveralls commented Dec 30, 2020

Coverage Status

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

@mifi
Copy link
Owner

mifi commented Jan 9, 2021

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

@jrdaepi
Copy link
Author

jrdaepi commented Jan 9, 2021

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

@mifi
Copy link
Owner

mifi commented Jan 24, 2021

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

@bas080
Copy link

bas080 commented Jan 14, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants