Delete a recurring item if deleting the last occurrence

RESOLVED FIXED in 6.7

Status

enhancement
RESOLVED FIXED
8 months ago
5 months ago

People

(Reporter: MakeMyDay, Assigned: MakeMyDay)

Tracking

Lightning 6.2

Details

Attachments

(1 attachment)

Assignee

Description

8 months ago
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!
Assignee

Comment 2

8 months ago
For the cleanup, I will file a separate bug.
Attachment #9010218 - Flags: review?(philipp)
Attachment #9010218 - Flags: approval-calendar-esr?(philipp)
Attachment #9010218 - Flags: approval-calendar-beta?(philipp)
Assignee

Comment 3

8 months ago
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+
Assignee

Comment 6

5 months ago
Sure, there's no need to rush. So let's let it bake a while on beta.
Keywords: checkin-needed

Comment 7

5 months ago
Pushed by mozilla@jorgk.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
Keywords: checkin-needed
Resolution: --- → FIXED

Updated

5 months ago
Target Milestone: --- → 6.8
You need to log in before you can comment on or make changes to this bug.