ivan-lednev / obsidian-day-planner

An Obsidian plugin for day planning with a clean UI and a simple task format
MIT License
1.93k stars 485 forks source link

Showing deleted recurring tasks from google #431

Closed p4ul closed 3 weeks ago

p4ul commented 2 months ago

Describe the bug If you have a Google Remote calendar it shows all recurring tasks, even if you delete one of them

To Reproduce Steps to reproduce the behavior:

  1. I added a remote calendar using a Google ics link (XXXXXX is censored) https://calendar.google.com/calendar/ical/p4ul.sincl4ir%40gmail.com/private-XXXXXXXXXXXXXX/basic.ics

  2. Setup a recurring task e.g. test, 9am to 10am repeat everyday

  3. sync Day Planner so you can see events on calendar

  4. in google calendar click on one event and delete it (click this event only)

  5. google calendar doesn't show deleted event

  6. resync day planner calendar

  7. day planner calendar still shows all original events

Expected behavior Events match locally and on google calendar.

aahventures commented 1 month ago

I took a quick look and it seems like a pretty simple fix. I hacked my local main.js by excluding any dates in icalEvent.exdate (exclude or exception dates), in addition to excluding recurrence overrides and it seems to fix it. Apparently there is another iCal property called EXRULE also, which should be taken into account if we want to be 100% correct, see: https://www.kanzaki.com/docs/ical/exrule.html.

If I have time, I'll try to open a PR. Otherwise I'd be happy if someone else took my findings and opened a PR too.

ivan-lednev commented 3 weeks ago

Closing this as a duplicate of #418.