Closed Bug 331997 Opened 18 years ago Closed 18 years ago

Edit Task dialog does not update task completed status correctly

Categories

(Calendar :: Internal Components, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ssitter, Assigned: jminta)

References

Details

Attachments

(1 file)

Edit Task dialog does not update task completed status correctly

If you set an already completed task from 'Completed' back to e.g. 'Needs process' using the Edit Task dialog the task is still displayed as completed in Sunbirds task list.

Steps to Reproduce:	 
1. Create a new task
2. Open Edit Task dialog and change status to 'Completed'. The % completed will be set to 100 automatically. Close dialog with OK.
3. View task in Sunbirds task list. The task is displayed as completed (strikethrough)
4. Open Edit Task dialog and change status back to 'Needs Process'. Set % completed to e.g. 50. Close dialog with OK.

Actual Results:
The task is still displayed as completed (strikethrough).

Expected Results:
The task is not displayed as completed (not strikethrough).

Additional Information:
If you set the task to 100% and back to 50% using the tasks context menu everything works ok.

Tested with Sunbird/0.3a1+ (20060328)
Also fails in Lightning 0.1 (20060313). So it is no regression from recent check ins.
Attached patch delete completed date — — Splinter Review
delete the completed date if the status isn't COMPLETED.
Assignee: base → jminta
Status: NEW → ASSIGNED
Attachment #216556 - Flags: first-review?(mvl)
Comment on attachment 216556 [details] [diff] [review]
delete completed date

Is all this needed? There is a fine calITodo.isCompleted. That should take care of all this.
(In reply to comment #3)
> (From update of attachment 216556 [details] [diff] [review] [edit])
> Is all this needed? There is a fine calITodo.isCompleted. That should take care
> of all this.
> 
There are several nice ways of getting this bug to go away.  Setting the isCompleted property to false would work as well.  Doing that would delete not only the completed date but also the status and the percentComplete.  Since percentComplete has already been set earlier in the saveItem function, this would be bad in the current code.  Since STATUS is overwritten in the next few lines after this patch, deleting it would have no effect.  So, our options are:
a) Take the patch, which deletes the only troublesome property or
b) use isCompleted = false and move percentComplete later in the save-process.
Comment on attachment 216556 [details] [diff] [review]
delete completed date

hmm, ok. Let's go for this simple fix then, instead of moving a bunch of code around.
Attachment #216556 - Flags: first-review?(mvl) → first-review+
Patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060929 Sunbird/0.3
Status: RESOLVED → VERIFIED
Whiteboard: [litmus testcase wanted]
Litmus testcase 2611 created
Whiteboard: [litmus testcase wanted]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: