Skip to content
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

Closed
wants to merge 15 commits into from
Closed

Recurrence #31

wants to merge 15 commits into from

Conversation

derekantrican
Copy link
Owner

Added handling of event recurrence

Still present shortcomings/issues:

@derekantrican
Copy link
Owner Author

This now needs to be updated for these changes: #28

@derekantrican
Copy link
Owner Author

Final testing needs to be done to check modification and deleting of recurring events before this can be approved

@derekantrican
Copy link
Owner Author

Ok, other than the shotcomings mentioned in the PR description (BYMONTHDAY & EXDATE) this should be ready to merge

@derekantrican
Copy link
Owner Author

derekantrican commented Feb 26, 2019

After doing testing, this looks almost perfect. Not parsing EXDATE is obviously a shortcoming. The only other issue I've found has been logged here: #34 (it is to do with PR #28) and can be addressed separately

@derekantrican derekantrican mentioned this pull request Mar 13, 2019

//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);
Copy link
Collaborator

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);
Copy link
Collaborator

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

Copy link
Collaborator

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,
Copy link
Collaborator

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.

@staffanf staffanf mentioned this pull request Jun 11, 2019
@derekantrican
Copy link
Owner Author

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

@derekantrican derekantrican restored the Recurrence branch October 17, 2019 16:36
@derekantrican derekantrican deleted the Recurrence branch November 1, 2019 19:33
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.

2 participants