Closed Bug 317135 Opened 14 years ago Closed 14 years ago

Completed tasks in a remote calendar are shown as uncompleted in the GUI


(Calendar :: General, defect)

Not set


(Not tracked)



(Reporter: bugzilla.i.sekler, Assigned: jminta)



(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051118 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051118 Mozilla Sunbird/0.3a1+

Sunbird stores the completion of tasks successfully in a "remote" (file://) *.ics file, but reloading the remote calendar makes the checkboxes in the task panel showing the completion of tasks to become unchecked.

This is a regression at least from Mozilla Calendar 2004121719-cal. A task marked as uncompleted there, then as completed in the mentioned 0.3a1+ and opened again in Mozilla Calendar 2004121719-cal keeps its "completed" state in 2004121719-cal but not in 0.3a1+.

Local calendar is not affected.

My windows build from 2005-11-19 (MinGW) shows the same behavior.

Reproducible: Always

Steps to Reproduce:
1. Create a task in a remote calendar;
2. Right click -> Progress -> 100% (or check the checkbox);
3. Reload the remote calendar.

Actual Results:  
The displayed completion of the task has been reset to zero, the checkbox becomes unchecked.

Expected Results:  
The actual progress and completion state stored in the *.ics file should be displayed.

Looks like a mirror of bug 232359.
Version: unspecified → Trunk
Attached patch patch v1 (obsolete) — Splinter Review
There were 2 general problems here:
1.) When setting a task as completed via the various UI elements, not all of the proper fields were set.
2.) When determining if a task was complete, we only checked percentComplete.  Instead, we should use the calTodo's isCompleted method.

With this patch, the testcase file shows as completed, but will not show a percentComplete.  It was created in a faulty way, and hence no percentComplete data is included in the file.  It remains up for debate whether we ought to internally correct flaws of this type if we find them.
Assignee: mostafah → jminta
Attachment #204015 - Flags: first-review?(mvl)
> It was created in a faulty way, and hence no percentComplete
> data is included in the file.

The fact is, that Sunbird builds (win32; linux untested) including 2005-11-22 didn't store PERCENT-COMPLETE value in a remote calendar. With Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20051126 Mozilla Sunbird/0.3a1+ it works finally.

Thanks a lot for the patch, it solves the problem for me.
Comment on attachment 204015 [details] [diff] [review]
patch v1

You could use calITodo.isCompleted in checkboxClick() and contextChangeProgress(). That will make sure don't forget to set a field.
Attachment #204015 - Flags: first-review?(mvl) → first-review-
Attached patch patch v2Splinter Review
Uses isCompleted whenever possible.
Attachment #204015 - Attachment is obsolete: true
Attachment #204282 - Flags: first-review?(mvl)
Attachment #204282 - Flags: first-review?(mvl) → first-review+
patch checked in.
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.