We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with duration after percent change

The problem is that after I perform a task percent change, and save the file, I could notice:

  1. the duration goes from work days to simple day and wrong
  2. if the duration is null then base start date and base finish date to reset.
    My program code (Java):
    FileInputStream fs = new FileInputStream(inp.MppFileName);
    existingProject = new Project(fs);
    ChildTasksCollector collector = new ChildTasksCollector();
    TaskUtils.apply(existingProject.getRootTask(), collector, 0);
    java.util.List tasks = collector.getTasks();
    for (int i = 0; i < tasks.size(); i++) {
    Task tsk = tasks.get(i);
    if (inp.Guid.equalsIgnoreCase(tsk.get(Tsk.GUID))) {
    tsk.set(Tsk.PERCENT_COMPLETE, inp.Percent);
    existingProject.save(mppOutputFile, SaveFileFormat.MPP);
    Could you help me with this?
    Thank you in advance,
    Best Regards
    Valery Zinoviev
    order 180907083503.


It is requested to kindly share sample project file with us so that we could investigate in detail.

Moreover, You may share confidential files in a private message and the files shared in private message shall only be accessible to Aspose staff. For this purpose, please find “Message” button by clicking on my name.


This is my MPP-file.


  • yellow – my change (from 0% to 1%);
  • red – reset to null;
  • green – set from 685 days to 2306 days;
  • blue – set from 151 wdays to 453 days

Thank you in advance,
Best Regards
Valery Zinoviev


Thank you for your feedback.

We are unable to reproduce this issue using the code sample provided with latest version of our API i.e. Aspose.Tasks for Java 18.11. We see no change in days.

Moreover, you may get more details for setting the duration of task in days at the link given below:

Furthermore, it is requested to please share more details in this regard like the input MPP file and the output MPP or some screenshots highlighting the wrong information for detailed investigation.