When modifying the "real duration" for ACWP calculations, the % completed is also modified along with the ACWP value. I would rather expect the % completed to remain at 100%, because the task is completed, it just took a shorter time then originally planned.
Diff:
Hi Julien,
I was pondering why that would happen and don't have an answer..... We are rewriting all of ProjectLibre and will make sure to address this. Thank you for your post!
Marc
Thanks for the follow up Marc! Much appreciated.
Settting a breakpoint in AssignmentDetail.setPercentComplete on line 134 of openproj_core/src/com/projity/pm/assignment/AssignmentDetail.java, when I change the actual duration, I get the following stack trace (read bottom to top):
AssignmentDetail.setPercentComplete(double) line: 134.
AssignmentDetail.setStop(long) line 920
Assignment.setStop(long) line 2045
NormalTask.setStop(long) line 1158
NormalTask(Task).setActualDuration(long) line 1177
So from setActualDuration, execution eventually gets to setPercentComplete.
Now if I remove the call to setPercentComplete on line 920, the actual duration never sets to the new actual duration and reverts back to the old actual duration. Also, if I set the call of setPercentComplete to a constant, such as:
setPercentComplete(0.5);
... the actual duration goes to half of what it was prevoiusly. So not only does actual duration influences percent complete, percent complete influences actual duration.
I think the trick to debugging this one is to remove the call to setPercentComplete, and then figure out why the actualDuration is still reverting to the old duration.
One hypothesis I had is that somewhere the execution gets the parents of the task to recalculate the schedule, but innavertently gets the current task and re-reads the previous duration.
Here's another clue in openproj_core/src/com/projity/pm/task/Task.java:1159 :
So, I'm thinking:
AssignmentDetail.setStop() (openproj_core_src/com/projity/pm/assignment/AssignmentDetail.java:896) needs to stop calling setPercentComplete
Task.getActualDuration() needs to calculate actualDuration some other way using actualStart and ???????
There lies the next question. When inspecting an object of normalTask class, I've seen the property actualStart, but no actualStop. I'll have to look more closely at how setStop works. I'm assuming I'll have to create the actualStop property, but I'm worried that may screw up parent duration caculations (or may require writting so much more code so that parents make the distintion between duration and actualDuration).
Input / feedback is most welcomed.
Last edit: Julien Lamarche 2013-03-10
Some thoughts for a potential fix.
I haven't compiled at the time of the posting. Its getting late and I'm not sure I can work further on this for today. But I did want to post my notes for feedback.
' a. If the task is not 100% complete, return % complete * duration (its actually not complete until the task is complete done, so your actual duratoin is the work that is partially done)
' b. If the task is 100% complete, then return the diff between ActualFinish - actualStart.
'2. In NormalTask.setStop, (openproj_core/src/com/projity/pm/task/NormalTask.java:1146), if the task is 100% complete, call setActualFinish .
I suspect I have to add a condition somewhere if the task is not 100% done, but I'm not sure where.
'3. In Task.setActualFinish (openproj_core/src/com/projity/pm/task/Task.java:1073), maybe set a property actualFinish rather then call set end. But without code re-write that would probably screw up schedule calculations for work packets (parent tasks).
I see there are two properties ./openproj_core/src/com/projity/pm/criticalpath/TaskSchedule.java : finish and end. Any idea what is the difference between the two? And is criticalpath/TaskSchedule used for non-critical path tasks?
'4. Only adjust percent complete if the task is not completed (?):
If I may repeat my question in a separate post:
I see there are two properties ./openproj_core/src/com/projity/pm/criticalpath/TaskSchedule.java : finish and end. Any idea what is the difference between the two? And is criticalpath/TaskSchedule used for non-critical path tasks?
My mistake:
What doesn't change is the planned (baseline) duration. "% complete" = "acutal duration" / duration because duration is how long the task is expected to last in its most recent estimation and reflected in the gantt chart, while "actual duration" is how long the ressource has worked on the task thus far. So, "actual duration" can't be long than duration, and it makes sense that % complete will depend on the value of "actual duration".
I'm using real and actual interchangeably here, I have the french interface where its called "durée réelle", I don't know what the English term is.
Closing ticket.
Not a bug.