Closed Bug 455133 Opened 17 years ago Closed 17 years ago

Dragging occurrences of a repeating event to the date of a previously deleted occurrence deletes them too

Categories

(Calendar :: Internal Components, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: dbo)

Details

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18pre) Gecko/2008091218 Sunbird/0.9 Dragging occurrences of a repeating event to the date of a previously deleted occurrence deletes them too Steps to Reproduce: 1. Start Sunbird with a clean profile 2. Create a repeating event 3. Delete one single occurrence of the repeating event 4. Drag and drop a different occurrences to the date of the deleted occurrence (e.g. you noticed that the wrong occurrences was deleted and want to correct it this way) Actual Results: The dragged occurrences disappeared too. Expected Results: The dragged occurrence is shown on the date it was dragged to.
Is it really deleted, or does it come back after a reload? Is also deleted in the resulting ics?
Flags: blocking-calendar0.9?
From a users point of view it's deleted and is not show after reload. From a technical point of view it's: ===== Original repeating event (step 2) ===== BEGIN:VCALENDAR PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN VERSION:2.0 BEGIN:VEVENT CREATED:20080914T104608Z LAST-MODIFIED:20080914T104638Z DTSTAMP:20080914T104608Z UID:abdf3829-3445-4b4f-9f4a-5f30125fc696 SUMMARY:Repeating event RRULE:FREQ=DAILY;COUNT=5;INTERVAL=1 DTSTART;VALUE=DATE:20080915 DTEND;VALUE=DATE:20080916 TRANSP:TRANSPARENT END:VEVENT END:VCALENDAR ===== After deleting one occurrence (step 3) ===== BEGIN:VCALENDAR PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN VERSION:2.0 BEGIN:VEVENT CREATED:20080914T104608Z LAST-MODIFIED:20080914T104705Z DTSTAMP:20080914T104608Z UID:abdf3829-3445-4b4f-9f4a-5f30125fc696 SUMMARY:Repeating event RRULE:FREQ=DAILY;COUNT=5;INTERVAL=1 EXDATE;VALUE=DATE:20080917 DTSTART;VALUE=DATE:20080915 DTEND;VALUE=DATE:20080916 TRANSP:TRANSPARENT X-MOZ-GENERATION:1 END:VEVENT END:VCALENDAR ===== After drag and drop of two other occurrence (step 4) ===== BEGIN:VCALENDAR PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN VERSION:2.0 BEGIN:VEVENT CREATED:20080914T104608Z LAST-MODIFIED:20080914T104734Z DTSTAMP:20080914T104608Z UID:abdf3829-3445-4b4f-9f4a-5f30125fc696 SUMMARY:Repeating event RRULE:FREQ=DAILY;COUNT=5;INTERVAL=1 EXDATE;VALUE=DATE:20080917 DTSTART;VALUE=DATE:20080915 DTEND;VALUE=DATE:20080916 TRANSP:TRANSPARENT X-MOZ-GENERATION:3 END:VEVENT BEGIN:VEVENT CREATED:20080914T104708Z LAST-MODIFIED:20080914T104734Z DTSTAMP:20080914T104708Z UID:abdf3829-3445-4b4f-9f4a-5f30125fc696 SUMMARY:Repeating event RECURRENCE-ID;VALUE=DATE:20080918 DTSTART;VALUE=DATE:20080917 DTEND;VALUE=DATE:20080918 TRANSP:TRANSPARENT X-MOZ-GENERATION:3 END:VEVENT BEGIN:VEVENT CREATED:20080914T104732Z LAST-MODIFIED:20080914T104734Z DTSTAMP:20080914T104732Z UID:abdf3829-3445-4b4f-9f4a-5f30125fc696 SUMMARY:Repeating event RECURRENCE-ID;VALUE=DATE:20080916 DTSTART;VALUE=DATE:20080917 DTEND;VALUE=DATE:20080918 TRANSP:TRANSPARENT X-MOZ-GENERATION:3 END:VEVENT END:VCALENDAR
Flags: blocking-calendar0.9? → blocking-calendar0.9+
Seems to be a regression: Opening the third sample above in Sunbird 0.8 shows the events as expected (one at 15.09, two at 17.09, one at 19.09).
Flags: blocking-calendar0.9+ → blocking-calendar0.9?
(Setting back blocking‑calendar0.9 to previous state)
Flags: blocking-calendar0.9? → blocking-calendar0.9+
Attached patch fix - v1Splinter Review
This should fix the bug, including some unit tests. However, the added tests show up that getNextOccurrence has bugs (in those cases). Since this is IMO a different bug, we should not fix it here. >- dates = dates.filter(function (d) { >- if (aReturnRIDs) { >- return d.rstart.compare(dateToRemove) != 0; >- } else { >- return d.compare(dateToRemove) != 0; >- } >- }); >+ dates = dates.filter(function (d) { return d.id.compare(dateToRemove) != 0; }); Just for reference: The core fix of this bug is to compare the RECURRENCE-ID, instead of the occurrence date here. Although I am pretty confident in this patch (all unit tests pass successfully, if I revert changes of bug 438964 comment #11), I am setting qawanted, because changes to calRecurrenceInfo.js are always good for regressions.
Assignee: nobody → daniel.boelzle
Status: NEW → ASSIGNED
Attachment #338719 - Flags: review?(philipp)
Flags: in-testsuite?
Keywords: qawanted
OS: Windows XP → All
Hardware: PC → All
Comment on attachment 338719 [details] [diff] [review] fix - v1 >+ test_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" + You've modified createEventFromIcalString, but I see no need to actually BEGIN:VCALENDAR here. Why not use BEGIN:VEVENT directly? >+ true /* ignore net occ check, bug xyz */); bug what? ;-) r=philipp
Attachment #338719 - Flags: review?(philipp) → review+
(In reply to comment #6) > (From update of attachment 338719 [details] [diff] [review]) > > >+ test_recur(createEventFromIcalString("BEGIN:VCALENDAR\nBEGIN:VEVENT\n" + > You've modified createEventFromIcalString, but I see no need to actually > BEGIN:VCALENDAR here. Why not use BEGIN:VEVENT directly? There are overridden items in that ics fragment, so I need an enclosing VCALENDAR. > >+ true /* ignore net occ check, bug xyz */); > bug what? ;-) filed bug 455490. Checked in on HEAD, MOZILLA_1_8_BRANCH and SUNBIRD_0_9_BRANCH => FIXED.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → 0.9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: