Closed Bug 405502 Opened 17 years ago Closed 17 years ago

Imported task is displayed twice in task list

Categories

(Calendar :: Tasks, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ssitter, Assigned: michael.buettner)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached file ics testcase —
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.10pre) Gecko/2007112606 Calendar/0.8pre

Steps To Reproduce:
1. Start Sunbird with clean profile
2. Import the attached ics file containing one task with start and due date
3. Check the task list

Actual results:
The task "Sample Task" is shown twice in the task list.

Regression Range:
  WORKS in Sunbird 0.8pre (2007-11-21-05)
  FAILS in Sunbird 0.8pre (2007-11-22-05)

Checkins during regression range: http://tinyurl.com/32ko8c

Seems to be caused by the checkin for Bug 253396.
Attached patch patch v1 — — Splinter Review
The import code doesn't play nice and comes up with overlapping calls to start/end batch plus the fact that the task tree didn't shield itself from items that try getting added more than once. this patch is an attempt to make this particular part of the tree more robust.
Assignee: nobody → michael.buettner
Status: NEW → ASSIGNED
Attachment #292423 - Flags: review?(daniel.boelzle)
Comment on attachment 292423 [details] [diff] [review]
patch v1

>+              if (index == undefined) {
I'd prefer the stronger ===.

>+                  this.binding.mTaskArray.push(aItem);
>+                  var index = this.binding.mTaskArray.length - 1;
exchange these lines and save the -1.

r=dbo
Attachment #292423 - Flags: review?(daniel.boelzle) → review+
patch checked in on trunk and MOZILLA_1_8_BRANCH

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Hardware: PC → All
Target Milestone: --- → 0.8
Version: Mozilla 1.8 Branch → unspecified
Verified using Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.12pre) Gecko/2007121105 Calendar/0.8pre.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: