davepar / gcalendarsync

Apps Script for syncing a Google Spreadsheet with Google Calendar
MIT License
163 stars 47 forks source link

Sheet > Cal always creating new event, never updating existing event #61

Open blue522 opened 4 years ago

blue522 commented 4 years ago

Whats happening When I run the sheet > cal script, any existing event (from a previous sync) is deleted in Cal and then replaced with a new event.

What I expect to happen Existing event in cal should be updated to preserve invitee responses and any locations that have been added.

Steps to reproduce

  1. run the sheet > cal script
  2. if any sheet row has been altered, a duplicate event appears on cal
  3. then the sheet presents a modal asking if the earlier version of the event should be deleted
  4. original event successfully deletes
  5. script replaces the sheet row Id with a new event Id
blue522 commented 4 years ago

Update: This seems to be happening because 'eventDiffs' always returns 999, which exactly matches the EVENT_DIFFS_WITH_GUESTS flag, causing a forced addEvent.