This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Event has changed in ICS feed, but script does not see it as a change #287
Labels
bug
Something isn't working
When I change something on Toggl.com (eg, change the duration of an event from say 1:00 to 1:10, but change nothing else), Toggl's ICS feed changes to report the modified event time, but the corresponding entry on my Google calendar created by the script does not change. I'm using v5.6 of the script and modifyExistingEvents is set to true. So, the modified event on Toggl.com should be detected and correctly synced to Google Calendar, but that doesn't happen.
The script appears to see the modified event as a duplicate because that's what the log reports, even though the event is not a duplicate. Any ideas how to fix?
My guess on what is happening is the script is using MD5 hashing to check an event for changes vs. a prior event, but the MD5 hash must only be applied to a subset of the event (eg, the summary and description) and must not be including the start and end times. If I'm right about how the script is using MD5 hashing, then pulling the start and end times into the MD5 hash should fix this problem.
Here's an example:
Test 1: Original event from ICS
Test 1: Modified event from ICS
Notice the DTEND time is different in the modified event because the modified event is 10 mins longer. The original end time is 23:30, and the modified end time is 23:40.
The script's log reports this:
If I also update the description field on Toggle, then the script does detect the change and does update the event. This makes me think the script is not looking at the start and end times to check for changes to an event.
Test 2: Original event from ICS
Test 2: Modified event from ICS
Notice here that "blah" has been added to the description field, but otherwise the events in test 2 are the same.
The script's log reports this:
I tried variations of test 2 where the start or end times also get updated along with changes to the description. So long as the description gets changed, the script does detect the modified event and syncs it correctly to the calendar with any modified times and description. This is what makes me think the MD5 is not also being run on the start and end times.
The text was updated successfully, but these errors were encountered: