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

Editing repeating event *must not* delete past events of the series

Open xss opened this issue 4 years ago • 3 comments

Say we have a repeating event that started on September 1. Now, when editing any later event of this series, let's say today's occurrence, and upon saving selecting "Update all occurrences", Simple Calendar will update all future occurrences of the series, but will delete all this series' occurrences before the selected date -- today in my example.

In my opinion, this is not the expected behavior of an option labelled "Update all occurrences". All occurrences should be updated equally, independent of whether they are future or past occurrences in the same series. As Simple Calendar doesn't have an option like "Update only future occurrences", this comes as even more of a surprise.

I didn't see anything "suspicious" concerning this issue in the corresponding dialog's code file. I suspect, "Update all occurrences" sets a new start date for the series --hence doesn't explicitly delete before the selected date--, which causes the previous occurrences to be lost.

Due to another long-standing bug in Simple Calendar --all reminders stop working unrecoverably after every time Android's battery saver feature got turned on; the only fix being to re-edit all events in Simple Calendar-- I'm forced to use this "Update all occurrences" functionality rather regularly.

Simple Calendar v6.6.1 Android 6.0.1 Event is on a CalDAV synced NextCloud calendar, not a "local" one

xss avatar Sep 22 '19 11:09 xss

I didn't see anything "suspicious" concerning this issue in the corresponding dialog's code file. I suspect, "Update all occurrences" sets a new start date for the series --hence doesn't explicitly delete before the selected date--, which causes the previous occurrences to be lost.

I've looked at the code, and this does indeed seem to be the case. I believe I have a fix for this, and I'll open a pull request once I test it and make sure it doesn't obviously break anything else.

nic3-14159 avatar Nov 23 '21 17:11 nic3-14159

I have the same issue with local calendar.

Aga-C avatar Jan 11 '22 16:01 Aga-C

@nic3-14159 did you manage to take a look at the code and maybe find out how to patch it?

dumblob avatar Jun 13 '22 14:06 dumblob

Hello!

If anyone is up for testing, here's a test APK with a fix: https://github.com/Naveen3Singh/Simple-Calendar/releases/download/fix_981/calendar-prepaid-debug.apk

Please let me know if it works for you or if it causes any new issues.

@xss @nic3-14159 @Aga-C @dumblob @Ordoviz @itaton

naveensingh avatar May 28 '23 23:05 naveensingh

@Naveen3Singh It works for me with local calendar 👍

Aga-C avatar May 29 '23 06:05 Aga-C