Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 442087 - Setting % Complete in Edit Task dialog to <100% on previously completed task does not reset completed status
: Setting % Complete in Edit Task dialog to <100% on previously completed task ...
Product: Calendar
Classification: Client Software
Component: Tasks (show other bugs)
: unspecified
: All All
: -- minor (vote)
: 2.1
Assigned To: Decathlon
Depends on:
  Show dependency treegraph
Reported: 2008-06-26 10:57 PDT by Lifesaver2000
Modified: 2012-11-06 09:11 PST (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

patch - v1 (3.95 KB, patch)
2012-10-31 03:26 PDT, Decathlon
matthew.mecca: review+
Details | Diff | Splinter Review
patch - v2 (3.95 KB, patch)
2012-11-05 15:09 PST, Decathlon
bv1578: review+
Details | Diff | Splinter Review

Description Lifesaver2000 2008-06-26 10:57:53 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Thunderbird version, Lightning 2008062520

In the task mode, if I have a task that is marked completed with the check box, then right click and select a percentage of completion less than 100%, the check mark and the line through the text goes away (as it should) and the task is no longer treated as completed. But if I double click the item then set the percentage to less than 100% in the Edit Task dialog window, the item remains checked and struck through, and still shows as completed in the context menu.

Reproducible: Always

Steps to Reproduce:
1. Open Edit Task Dialog for a task previously marked as completed by the checkbox
2. Set the "% complete" to less than 100%
3. Save and Close
Actual Results:  
The Completed checkbox remains checked, the item is struck through, and it still "behaves" like a completed task.  The progress bar does show the correct percentage of completion, even though the completed checkbox is checked.

Expected Results:  
The item should no longer be marked as completed if progress is less than 100%

Everything works as expected if the progress percentage is selected from the context menu in either task mode or in the Today Pane.
Comment 1 Lifesaver2000 2008-06-26 15:40:25 PDT
Some additional.  This bug may be invalid, and may actually need to be worked on from a different angle.

I realized that in the Edit Task dialog, the status drop down does not automatically change from "Completed on" to "In process" when the percent complete is changed to less than 100%.  Changing this to "In process" when changing the % complete makes everything behave as expected.  But, this still isn't right, in my opinion.

I suggest that EITHER the Status should change to "In process" automatically if the "% complete" is changed to less than 100%, OR it should not be possible to edit the "% complete" unless the status is changed to something other than "Completed on."  This will avoid the conflict in the task view that is possible between the progress bar and the completion check box.

Unless, of course, a task can be completed yet not 100% Complete.  For me, that doesn't work, but maybe I am missing something.
Comment 2 Simon Paquet [:sipaq] 2008-09-02 02:19:20 PDT
Confirming on today's Sunbird nightly build
Comment 3 Francesco Turco 2012-10-27 03:03:39 PDT
I noticed a similar problem. I often need to mark a task as completed and create another identical task at a different date in the future, this latter one without the "completed" status. So I copy the first (completed) task and paste it as a second identical task. But this second task remains struck out, no matter if I try to set the status as "not specified".
Comment 4 Decathlon 2012-10-31 03:26:00 PDT
Created attachment 676957 [details] [diff] [review]
patch - v1

I've tried to address the request in comment #1. 

This patch changes the status to COMPLETED when the user types or selects 100 in the percent-completed-textbox, and changes the status to IN-PROCESS when the percent complete becomes less than 100. It also changes the percent completed to 99 when the user changes the status from COMPLETED to IN PROCESS or to NEEDS ACTION. I'm not sure if the percent complete text box has to be enabled with the NEEDS ACTION status selected (I've found nothing on RFC5545) so I've left it as it is.
Moreover it sets the percent complete textbox to 0 when the "Not Specified" status is being selected.
Comment 5 Matthew Mecca [:mmecca] 2012-11-01 18:48:15 PDT
Comment on attachment 676957 [details] [diff] [review]
patch - v1

Review of attachment 676957 [details] [diff] [review]:

Looks good overall, r=mmecca with the following:

::: calendar/base/content/dialogs/calendar-event-dialog.js
@@ +2401,5 @@
>    }
> +  if ((status == "IN-PROCESS" || status == "NEEDS-ACTION") &&
> +       oldPercentComplete == "100") {
> +      setElementValue("percent-complete-textbox", "99");

Since tasks can be in the state of in-process or needs-action without having any portion of the task completed, I think it would be safer to set the percent completed back to 0 here, otherwise we're making an assumption that some portion of the task is still completed which may not be true.
Comment 6 Decathlon 2012-11-05 15:09:56 PST
Created attachment 678494 [details] [diff] [review]
patch - v2

Corrected the patch as requested in the previous comment.

Comment 7 Philipp Kewisch [:Fallen] 2012-11-06 09:10:31 PST
Pushed to comm-central changeset 6bb72428dcfd

Note You need to log in before you can comment on or make changes to this bug.