Hi,
I want to clear all Actual of Project, but met some problem for that.
I attached the MPP file, can you help me to clear all the Actual of Project and save as the file? Can you give the example code?
Hi,
Hi Zhencheng,
Hi Kashif,
Have there been any fresh developments of this issue?
Hi Zhencheng,
OK, look forward your reply.
Hi Zhencheng,
The issues you have found earlier (filed as TASKSJAVA-218) have been fixed in this update.
Hi,
Hi,
Project proj = new Project(“input.mpp”);
proj.setCalculationMode(CalculationMode.None);
ChildTasksCollector collector = new ChildTasksCollector(); // Create a ChildTasksCollector instance
TaskUtils.apply(proj.getRootTask(), collector, 5); // Collect all the tasks from RootTask using TaskUtils
for (Task tsk : collector.getTasks())
{
tsk.set(Tsk.ACTUAL_WORK, proj.getDuration(0));
for (ResourceAssignment assignment : tsk.getAssignments())
{
assignment.set(Asn.ACTUAL_WORK, proj.getDuration(0));
}
tsk.set(Tsk.ACTUAL_DURATION, proj.getDuration(0));
tsk.set(Tsk.PERCENT_COMPLETE, 0);
tsk.set(Tsk.PERCENT_WORK_COMPLETE, 0);
tsk.set(Tsk.PHYSICAL_PERCENT_COMPLETE, 0);
}
proj.recalculate();
Hi kashif,
Hi zhencheng,
Hi Kashif,
Hi Etienne,