Closed Bug 1170271 Opened 9 years ago Closed 9 years ago

Provider does not sync single occurrences deleted occurrences

Categories

(Calendar :: Provider: GData, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

Attachments

(2 files)

STR:

1. create daily recurring series
2. delete single occurrences in web UI
3. synchronize Lightning

Results:

* Occurrence is not removed, but I get this:

Timestamp: 6/1/15, 9:03:03 PM
Error: [calCachedCalendar] replay action failed: null, uri=googleapi://kewisch@gmail.com/?calendar=kewisch%40gmail.com&tasks=%40default, result=Can not modify immutable data container'Can not modify immutable data container' when calling method: [calIRecurrenceInfo::removeOccurrenceAt], op=[xpconnect wrapped calIOperation]
Source File: file:///Users/kewisch/Library/Thunderbird/Profiles/8xwcqxp9.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCachedCalendar.js
Line: 322
Priority: -- → P1
Attached patch Fix - v1 β€” β€” Splinter Review
This fixes it. The unit test is mostly untested, because I can't run them correctly due to bug 1190012. I'd rather keep it though because this will force me to fix the test with bug 1190012 instead of not writing it.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #8647139 - Flags: review?(mohit.kanwal)
Comment on attachment 8647139 [details] [diff] [review]
Fix - v1

Review of attachment 8647139 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM.

::: calendar/providers/gdata/modules/gdataUtils.jsm
@@ +1068,5 @@
>                  if (exc.id in this.masterItems) {
>                      item = this.masterItems[exc.id];
>                  } else {
>                      item = (yield this.promiseOfflineStorage.getItem(exc.id))[0];
> +                    item = item.clone();

oh yeah! damn good catch.
Attachment #8647139 - Flags: review?(mohit.kanwal) → review+
Pushed to comm-central changeset e6c5bce2b8fb
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 4.4
Target Milestone: 4.4 → 4.5
This doesn't quite work if there are occurrences in the stream that don't have a master, neither in the stream nor in the offline storage. Moving the clone call to only occur when there is an item helps and a fake master will be created later on.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch Regression Fix - v1 β€” β€” Splinter Review
Attachment #8672583 - Flags: review?(mohit.kanwal)
Attachment #8672583 - Flags: approval-calendar-aurora+
Comment on attachment 8672583 [details] [diff] [review]
Regression Fix - v1

Review of attachment 8672583 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good
Attachment #8672583 - Flags: review?(mohit.kanwal) → review+
Pushed to comm-central changeset 27df23ea2d73
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: 4.5 → 4.6
Target Milestone: 4.6 → 4.7
According to comment 5 the original patch landed in 4.4. The regression fix is now in 4.7. 
How serious is the regression and do we need to port it back up to 4.4?
It won't hurt to backport this to beta, but since the gdata provider is only released periodically, I think it will be ok.

https://hg.mozilla.org/releases/comm-aurora/rev/d0455ccc36ab
https://hg.mozilla.org/releases/comm-beta/rev/54d2b5e104a7
Target Milestone: 4.7 → 4.5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: