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

Handle Series #166

Open
Trefex opened this issue Jul 4, 2024 · 5 comments
Open

Handle Series #166

Trefex opened this issue Jul 4, 2024 · 5 comments

Comments

@Trefex
Copy link

Trefex commented Jul 4, 2024

Hi,

I think at the moment series are handled as individual events, whereas they should be handled as series to avoid issues.

Could this be something to add to the roadmap?

Many thanks
T

@alxndr13
Copy link
Contributor

Which issues are you experiencing with series?

@Trefex
Copy link
Author

Trefex commented Jul 13, 2024

If they are synced as individual events rather than series, you can't update the series in the target calendar in batch mode, eg to set from Busy to Free etc.

@alxndr13
Copy link
Contributor

ah, that makes sense! Thanks for the headsup!

@Trefex
Copy link
Author

Trefex commented Aug 7, 2024

I investigated a little bit, and want to share my findings.

For MS 365, there is a field type that can contain singleInstance, occurrence, exception, seriesMaster as possible values. When you target /events you will get a list of only types singleInstance or seriesMaster.

From there, using a startDateTime and endDateTime you can extract all occurrence and exception from a seriesMaster by using the series id and the /events/{event-id}/instances endpoint. Any non-modified instance of a series will be of type occurrence and may not need to be updated, or rather will not be different than the information contained in seriesMaster. Any single instance that has different dates, different body, etc will be of type exception.

From my limited understanding you are not patching events anyway, but just copying all of them.

So the elegant solution would be to handle the types differently, the brute-force approach would be to check for seriesMaster type and then fetch all instances of that series (regardless the type) and just copy all fields to the other entry.

Important to note is that a new field should be tracked / used, which is seriesMasterId which contains the ID of the seriesMaster event.

I am not an expert in Go, and I also do not want to impede on your logic, so do you think this is something you could implement or would you need more information ? @alxndr13

@alxndr13
Copy link
Contributor

@Trefex i will have a look at this when i got the time. Currently i'm kinda busy moving and enjoying the summer :) Will probably tackle this in the winter or so.

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

No branches or pull requests

2 participants