Closed Bug 1890975 Opened 1 year ago Closed 1 year ago

When updating start time of recurring event series, should not move the time of event exceptions

Categories

(Calendar :: General, defect)

Thunderbird 115
defect

Tracking

(thunderbird_esr115 wontfix)

RESOLVED FIXED
128 Branch
Tracking Status
thunderbird_esr115 --- wontfix

People

(Reporter: ludovic.derouin, Assigned: mkmelin)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0

Steps to reproduce:

  1. Create a recurring event (ex: every day at 12PM)
  2. Create an exception by changing the hour of an occurence (ex: from 12 to 13PM)
  3. Update all the recurring event, changing the hour (ex: from 12PM to 14PM)

Actual results:

  • The recurring event is moved from 12 to 14PM
  • The event exception is moved from 13PM to 15PM

Lightning seems to keep some kind of "+1 hour" concept in mind, which could induce user errors when managing meetings and invitations.

Expected results:

I would expect the exception to behave in one of two ways:

  • Not moving at all, being an exception (13PM)
  • Be moved at the new given hour, since the user is changing "all occurences" (14PM)

Users in our use cases (French Ministry of Ecological Transition and Territorial Cohesion) would rather have the exceptions not changed at all when the recurring event is updated.

I'm still figuring out how to implement the option wich would be best for us. (not move the exceptions at all when the reccurence is changed.)
Here is however a simple way to implement the first behavior I described (the exceptions are all moved to the new hours when the whole reccurence is changed).

index f24f210..945e34a 100644
--- a/modules/CalRecurrenceInfo.jsm
+++ b/modules/CalRecurrenceInfo.jsm
@@ -816,7 +816,7 @@ CalRecurrenceInfo.prototype = {
 
     let startTimezone = aNewStartTime.timezone;
     let modifiedExceptions = [];
-    for (let exid of this.getExceptionIds()) {
+    /*for (let exid of this.getExceptionIds()) {
       let ex = this.getExceptionFor(exid);
       if (ex) {
         ex = ex.clone();
@@ -834,7 +834,7 @@ CalRecurrenceInfo.prototype = {
     }
     for (let modifiedEx of modifiedExceptions) {
       this.modifyException(modifiedEx, true);
-    }
+    }*/
   },
 
   onIdChange(aNewId) {

I found a way to implement the behavior I described, wich would be in my opinion the best way to handle exceptions in recurrences.
With this simple change, exceptions are not moved when the whole recurrence is moved:

diff --git a/modules/CalRecurrenceInfo.jsm b/modules/CalRecurrenceInfo.jsm
index f24f210..f595e58 100644
--- a/modules/CalRecurrenceInfo.jsm
+++ b/modules/CalRecurrenceInfo.jsm
@@ -827,7 +827,7 @@ CalRecurrenceInfo.prototype = {
         rid = rid.getInTimezone(rdate ? rdate.timezone : startTimezone);
         rid.addDuration(timeDiff);
         ex.recurrenceId = rid;
-        cal.item.shiftOffset(ex, timeDiff);
+        //cal.item.shiftOffset(ex, timeDiff);
         modifiedExceptions.push(ex);
         this.removeExceptionFor(exid);
       }

Thanks for the report!
I agree recurrences need to stay at their specific times no matter if the series changes.

I'll note that

  • google calendar will change all, including the recurrence exceptions
  • fastmail calendar will keep recurrences intact, like requested in this bug
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Lightning updates event exceptions when updating recurring event → When updating start time of recurring event series, should not move the time of event exceptions
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Target Milestone: --- → 128 Branch

Pushed by john@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/8af9d0761d67
When updating start time of recurring event series, should not move the time of event exceptions. r=leftmostcat

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Duplicate of this bug: 1898688
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: