derekantrican / GAS-ICS-Sync

A Google Apps Script for syncing ICS/ICAL files faster than the current Google Calendar speed
GNU General Public License v3.0
1.5k stars 191 forks source link

Keep reminders when updating events #299

Closed jordanbtucker closed 1 year ago

jordanbtucker commented 1 year ago

When an event is updated, it does not retain any reminders previously added to it.

For example:

  1. Sync an ICS with a Google Calendar.
  2. Add a reminder to an event.
  3. Sync the ICS again after that event was changed in the ICS.
  4. Note that the event in the Google Calendar has its reminders removed.

I'd like to request a feature where reminders added to a Google Calendar event stay with that event even after being updated by a sync. This likely only makes sense when addAlerts is set to false.

jonas0b1011001 commented 1 year ago

In Helpers.gs:

Sync with addAlerts = false. Let me know if that's the behavior you are looking for.

jordanbtucker commented 1 year ago

@jonas0b1011001 Thanks. I already did something similar that worked.

I added the following line between lines 221 and 222 and set addAlerts to false.

newEvent.reminders = calendarEvents[index].reminders;

This is a little more narrow in scope than patch because I was just targeting reminders. But I could see how it could be useful to patch the event to maintain any other information added to an event that isn't in the ICS, not just reminders.