-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Creates recurrent meetings even when some meetings are canceled #398
Comments
From my first impression the input ics is wrong. Looking at the first event from your screenshot:
According to this definition an event instance starting on the 20th at 11pm PST should be excluded. The correct EXDATE would either be May i ask where your source ics is coming from? Diving this deep into fixing the input might be out of the scope of this script, at least i don't have a quick fix for it. |
Thanks for taking a look and totally appreciate if it's out of scope but I thought I would provide more information in case that helps: The original calendar is my Outlook work calendar: https://pastebin.com/11DKbUme From (work) Outlook to (personal) Google Calendar works as intended. The script does remove recurrent events that were canceled. This is the "blue" calendar in the screenshot above. I was then using this Google Calendar in Home Assistant but started to see these recurrent entries that should have been removed. These entries were only showing up in Home Assistant and not in Google Calendar. To troubleshoot, I am using the script again to copy my Google Calendar (blue) to new Google Calendar (pink) and here's where you see these entries that are neither in the original Outlook nor in the first copied Google Calender (blue). Here's the link to the second Google Calendar (pink), if it helps: https://pastebin.com/6aMj0DCP The goal is to run some automations based on the calendar in Home Assistant but because it has unremoved recurrent events, I am running into issues. Once again, really appreciate the effort on this script and this may be just unsolvable due to Outlook issues. |
tl;dr:Apply the changes from #399. Please be so kind and provide feedback so we can push it to master if all works.
After reading this i assumed the script is actually creating the false exdates somehow. I was able to reproduce the behavior you are describing, however it seems like google is messing up the exdates. What the script sends to google's API on the first sync:
What we get back from google on the second sync:
Now the interesting partChanging the exdates in the source from sync one to UTC actually fixes the issue! Input Sync2:
And the best part: it even stays fixed if you would add a third step (sync the GCal from step 2 to another GCal), therefore exdate being in UTC can't be the actual solution. Google does not know "Pacific Standard Time", therefore treats it as UTC and converts it to "America/Los_Angeles". This is how the wrong exdates in calendar 2 are created. Solution: We need to replace timezones in recurrence parameters aswell, code is at the beginning of this post. |
Thank you so much! The changes in #399 worked! Sent a little thank you to your PayPal for this and all the work on this script! |
Thank you, glad we figured it out! |
The problem
When there is a recurrent meeting, but one of the meeting from the series is canceled, it still creates that meeting during copy.
Screenshots attached. Original calendar has two meetings for Dec 21 - they are in blue. They were copied correctly. But the pink calendar (copied from blue) has more, which are all recurrent ones in the original calendar but were canceled for Dec 21.
Version of GAS-ICS-Sync
5.8
Additional information & file uploads
Settings:
var howFrequent = 15;
var onlyFutureEvents = false;
var addEventsToCalendar = true;
var modifyExistingEvents = true;
var removeEventsFromCalendar = true;
var removePastEventsFromCalendar = true;
var addAlerts = "yes";
var addOrganizerToTitle = false;
var descriptionAsTitles = false;
var addCalToTitle = false;
var addAttendees = false;
var defaultAllDayReminder = -1;
var overrideVisibility = "";
var addTasks = false;
var emailSummary = false;
var email = "";
var customEmailSubject = "";
var dateFormat = "YYYY-MM-DD"
ICS string: https://pastebin.com/gaZ6uGRV
The text was updated successfully, but these errors were encountered: