Updating % complete doesn't work for some tasks (but impacts their duration instead)



Running Aspose Java 18.8 JDK7. (issue can be reproduced on earlier versions)

I’ve been running the following code to update the % complete of all leaf tasks in attached MPP file to an arbitrary value (33%):

private static void doRun(int percentComplete) throws IOException {
        Project p = getProject("Project STAR Work Plan.mpp");

        updatePercentComplete(p.getRootTask(), percentComplete);

        saveMppFile(p, "c:\\temp\\output1-"+percentComplete+".mpp");

    private static void updatePercentComplete(Task tsk, int percentComplete) {
        if (tsk.getChildren().isEmpty()) {
            tsk.set(Tsk.PERCENT_COMPLETE, percentComplete);
        } else {
            for (Task t : tsk.getChildren()) {
                updatePercentComplete(t, percentComplete);

Here’s the original file used:
Test Work plan.zip (65.4 KB)

In the result file (below), first two tasks are correctly updated, but the third task (milestone task) is not updated. It keeps its % complete value of 0%, and its duration is modified instead.

output1-33.zip (71.7 KB)

We can reproduce the problem on many tasks (not just milestones) with a much more complex MPP file that we can share if needed, but the simple file attached is enough to reproduce the issue.

We have not been able to find what’s causing the problem on the impacted tasks - we have no problem when creating a new MPP file from scratch, nor with most of our other MPP files. However, for some of them, we’re witnessing this issue.

Any help on what’s causing this would be appreciated.




We have reproduced this issue and it has been logged under ID “TASKSJAVA-734” for further investigation. You will automatically be informed here once we have more information to share.