When deleting occurences of recurring events, the user currently can end up to have all occurences deleted, but the parent item stays in the calendar (however not accessible to the user anymore). We should delete the recurring event if we delete the last occurrence of a recurring event. As a folow up, we should over a cleanup job to remove recurring events without occurrences from the users calandars.
This seems easy to do if the rule is finite, especially so if it has a COUNT component since we can just compare the number of exdates. For those with UNTIL however, we'd have to iterate all the occurrences until rule end while removing from a Set with the exdates. For a very long running rule I think this could have a performance impact. The same goes for the cleanup job, I think this could impact performance as well. We also need to figure out how to message this, because if it is a meeting event then deleting it may cause emails to be sent out. Don't get me wrong though, I think it would be great to do this!
For the cleanup, I will file a separate bug.
Of cause this is just for finite rule or an rdate collection, since for infinte rules, you never get to have a last occurrence. Performace might be an issue for the cleanup, that should be a background operation once all calendars have been loaded and TB is more or less ideling.
See my previous report for this: bug 351850.
Comment on attachment 9010218 [details] [diff] [review] DeleteRecurringItemWhenDeletingTheLastOccurrence-V1.diff Review of attachment 9010218 [details] [diff] [review]: ----------------------------------------------------------------- Ok, lets take this. I'm a bit cautious still because I don't want to regress performance, so maybe we can run this on beta a bit to get a feel for it, and then reconsider for ESR.
Attachment #9010218 - Flags: review?(philipp)
Attachment #9010218 - Flags: review+
Attachment #9010218 - Flags: approval-calendar-esr?(philipp)
Attachment #9010218 - Flags: approval-calendar-esr-
Attachment #9010218 - Flags: approval-calendar-beta?(philipp)
Attachment #9010218 - Flags: approval-calendar-beta+
Sure, there's no need to rush. So let's let it bake a while on beta.
Pushed by email@example.com: https://hg.mozilla.org/comm-central/rev/aa9c13717f77 Delete a recurring item if the last occurrence is deleted; r=philipp
Status: ASSIGNED → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → FIXED
TB 65 beta 2 / Cal 6.7: https://hg.mozilla.org/releases/comm-beta/rev/6cb2a1aba7f156a166a342826b8c6876b77802ef
Target Milestone: 6.8 → 6.7
You need to log in before you can comment on or make changes to this bug.