-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recurrence #31
Recurrence #31
Conversation
This now needs to be updated for these changes: #28 |
Final testing needs to be done to check modification and deleting of recurring events before this can be approved |
Ok, other than the shotcomings mentioned in the PR description ( |
|
||
//Since there is no CalendarEventSeries.getRecurrence() method we can use to check then we will always set the recurrence | ||
//(which also means setting the time). This also solves the situation of a regular event becoming a recurring event. | ||
eSeries.setRecurrence(fe.recurrence, fe.startTime, fe.endTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setRecurrence does not delete the exisiting recurring events.
So if you change an event from Interval 2 days to interval 3 days you will end up with it repeating every 2 and every 3 days..Might have to delete the old Eventseries and freshly create the new one.
//Event used to be a recurring event, but is now a regular event. Delete the recurring series from | ||
//the calendar and create the new event fresh | ||
e.getEventSeries().deleteEventSeries(); | ||
CreateEvent(targetCalendar, fe); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have to set the ID of the new event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checks below should be the else case, no need to check for changes after freshly adding the new event
description : customEvent.description | ||
}); | ||
|
||
resultEvent = resultEvent.getEventSeries().setRecurrence(customEvent.recurrence, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to set the start and end time for the EventSeries. Using setRecurrence(event, startDate) works just fine and will not turn AllDay Events to normal Events.
Closing this PR because we'll be doing recurrence through the full Google Calendar API and the fork here (which will then get pulled back into this repo). However, a lot of the code refactoring changes that were done in this PR should still be implemented |
Added handling of event recurrence
Still present shortcomings/issues:
BYMONTHDAY
(eg-3
for events that repeat on the third-to-last day of the month). Submitted a bug for this to Google: https://issuetracker.google.com/issues/124579536EXDATE
(recurrence exclusions). This is a known issue with ICAL.js (Timezone not set correctly when iterating occurrences kewisch/ical.js#257) and we may be able to provide a workaround in the future (or just adopt ical-expander instead)