Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Event has changed in ICS feed, but script does not see it as a change #287

Closed
joshdcurry opened this issue Sep 28, 2022 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@joshdcurry
Copy link

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

BEGIN:VEVENT
SUMMARY:(no project)
DESCRIPTION:Something
UID:14dc503c-fc3e-55c9-9b53-9b0545225b4c
DTSTAMP:20220926T221410Z
DTSTART:20220926T221409Z
DTEND:20220926T233019Z
END:VEVENT

Test 1: Modified event from ICS

BEGIN:VEVENT
SUMMARY:(no project)
DESCRIPTION:Something
UID:14dc503c-fc3e-55c9-9b53-9b0545225b4c
DTSTAMP:20220926T221410Z
DTSTART:20220926T221409Z
DTEND:20220926T234019Z
END:VEVENT

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:

[22-09-28 14:43:39:383 PDT] Skipping unchanged Event 14dc503c-fc3e-55c9-9b53-9b0545225b4c

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

BEGIN:VEVENT
SUMMARY:(no project)
DESCRIPTION:Something
UID:14dc503c-fc3e-55c9-9b53-9b0545225b4c
DTSTAMP:20220926T221410Z
DTSTART:20220926T221409Z
DTEND:20220926T233019Z
END:VEVENT

Test 2: Modified event from ICS

BEGIN:VEVENT
SUMMARY:(no project)
DESCRIPTION:Something blah
UID:14dc503c-fc3e-55c9-9b53-9b0545225b4c
DTSTAMP:20220926T221410Z
DTSTART:20220926T221409Z
DTEND:20220926T234019Z
END:VEVENT

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:

[22-09-28 15:26:11:722 PDT] Timezone Z unsupported!
[22-09-28 15:26:11:723 PDT] Using Timezone Etc/GMT!
[22-09-28 15:26:11:725 PDT] Updating existing event 14dc503c-fc3e-55c9-9b53-9b0545225b4c

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.

@joshdcurry joshdcurry added the bug Something isn't working label Sep 28, 2022
@derekantrican derekantrican changed the title Event has changed in ICS feed, but script does see it as a change Event has changed in ICS feed, but script does not see it as a change Sep 29, 2022
Repository owner locked and limited conversation to collaborators Mar 21, 2023
@derekantrican derekantrican converted this issue into discussion #325 Mar 21, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant