Re: [tasklist] Done/PercentsComplete
Tor Norbye <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.tasklist.devel |
|---|---|
| Organization | Sun Microsystems, Inc |
| Message-ID | <1045767343.5414.281.camel@proto> |
On Thu, 2003-02-20 at 10:16, Tim Lebedkov wrote:
> Hi Tor,
>
> 2. We could just force the user to have subtasks that form the complete 100%
> of parent task
But this means users won't be able to do subtasks like this:
- fix bug C
- check if C is the same as bug G
I think this is valid usage of the user tasks (because I tend to
do subtasks that way) so I'd prefer it if this wasn't prevented.
> If it is not enough we could introduce effort field and compute the
> average using this field.
> This way percents property will be only editable for tasks that have no
> children.
How about if we keep track of whether or not the user has edited
the priority?
By default, a task has percent complete = -1.
The user can set it to any number in the interval [0,100].
(We may also allow the user to set it to -1).
If you ask for getPercentComplete() (which is done by the
view when displaying the tasklist)
if -1, it returns an average of the child priorities
else return percent number
The net effect of this is that if I just enter some tasks, set some
children tasks to say 25% done - then the parent task will update
to show a percentage based on the children. If I go and hand-edit
the percent complete on the parent task (such that it's no longer -1
internally), then that number is used.
-- Tor