Simple-Calendar icon indicating copy to clipboard operation
Simple-Calendar copied to clipboard

[Bug] Editing date of a repeating event for a single occurrence does not replace old event

Open DecemberGiraffe opened this issue 2 years ago • 4 comments

For a repeating event, selecting on one of the occurrences and editing the date and selecting 'Update the selected occurrence only', creates a new event for that date but does not replace the old event. The old event should not exist anymore.

DecemberGiraffe avatar Aug 24 '23 18:08 DecemberGiraffe

Do you mean the whole old repeating event should be deleted? Because it seems to work fine - you edit the selected occurrence, so it creates a new event in that place and removes that occurrence, but the old event remains to keep the rest of occurrences.

Aga-C avatar Aug 24 '23 19:08 Aga-C

It doesn't remove the old single occurrence.

For example, if there is an event that repeats monthly on the 15th of every month and I edit (selecting 'Update the selected occurrence only') the date for the one in September to September 30, a new event is created for September 30 but the old event for September 15 still exists. I was expecting it to be deleted after the new September 30 event was created. The other repeating events for Oct 15, Nov 15, etc. still exist of course.

DecemberGiraffe avatar Aug 26 '23 23:08 DecemberGiraffe

Ok, it seems that in fact there's a bug when changing the day of an event, not just an hour.

Aga-C avatar Aug 27 '23 06:08 Aga-C

I've checked quickly, and it looks like DB has stored wrong date for repetition exceptions. It stores the date of the changed occurrence, but not the original one, so the calendar still displays the old event. The solution would be to change what's stored in repetition exceptions, but it will make all current entries invalid, and probably it'll be needed to write some extra logic, e.g. updating repetition exceptions on event update.

Aga-C avatar Aug 27 '23 07:08 Aga-C