If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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



12 years ago
12 years ago


(Reporter: Ilja Sekler, Assigned: Joey Minta)




(2 attachments, 1 obsolete attachment)

400 bytes, text/plain
2.73 KB, patch
Michiel van Leeuwen (email: mvl+moz@)
: first-review+
Details | Diff | Splinter Review


12 years ago
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.

Comment 1

12 years ago
Created attachment 203651 [details]
a *.ics file with a single completed task


12 years ago
Version: unspecified → Trunk

Comment 2

12 years ago
Created attachment 204015 [details] [diff] [review]
patch v1

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)

Comment 3

12 years ago
> 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-

Comment 5

12 years ago
Created attachment 204282 [details] [diff] [review]
patch v2

Uses isCompleted whenever possible.
Attachment #204015 - Attachment is obsolete: true
Attachment #204282 - Flags: first-review?(mvl)
Attachment #204282 - Flags: first-review?(mvl) → first-review+

Comment 6

12 years ago
patch checked in.
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.