I am trying to update the percent complete of some tasks but it is not working.
Hi Delio,
Thank you for contacting Aspose Support team.
We have investigated this issue with the latest version of Aspose.Tasks for .NET 9.2.1 and no such issue is observed as you have shared. The following code sample properly sets the percent complete of the task to 100%. I have attached the input file here for your reference. Please try it with the latest version of the API and share your feedback with us.
Sample Code:
Project project = new Project(“Updated.mpp”);
Task task = project.RootTask.Children.GetByUid(1);
task.Set(Tsk.PercentComplete, 100);
project.Recalculate();
project.Save(“Updated-2.mpp”, SaveFileFormat.MPP);
Hi Kashif
i Delio,
I have tested the following code to set the percentage of child task, and it is observed that parent task percent complete is automatically calculated. This code is tested using both Aspose.Tasks for .NET 8.7.0 and Aspose.Tasks for .NET 9.2.1. You may please test it using attached file and let us know the feedback.
Project proj = new Project(“Project1.mpp”);
Task t2 = proj.RootTask.Children.GetByUid(2);
t2.Set(Tsk.PercentComplete, 100);
proj.Save(“Updated921.mpp”,new MPPSaveOptions());
Hi Kashif,
Hi Delio,
Thank you for providing supporting material.
This issue is reproduced here and logged under Id: TASKS-34508 for further investigation by the product team. You will be automatically notified once any update is available in this regard.