Percentage complete is showing as 99%

Hi,


I am currently using Aspose.Tasks of version 8.6.0. I have task which is completed, and its is showing as completed(100%) in MPP. But When I set the IsActive property for the task in MPP the percentage completion will show as 99% in some other tool like projectplan365 the percentage completion is coming as 100%.

I am setting the IsActive property with the help of below code,

task.Set(Tsk.IsActive, false);

Please help me with this.

Hi Nishanth,

Thank you for writing to Aspose support team.

I have tested the following code using latest library version Aspose.Tasks for .NET 9.2.1 and observed no issue. Could you please give a try to the following sample code and let us know the feedback.

Project proj = new Project(@"SingleTask.mpp");
foreach (Aspose.Tasks.Task tsk in proj.RootTask.Children)
{
    tsk.Set(Tsk.IsActive, false);
}
proj.Save(@"result.mpp", SaveFileFormat.MPP);
Project proj2 = new Project(@"result.mpp");
Aspose.Tasks.Task tsk2 = proj2.RootTask.Children.GetById(1);
Console.WriteLine(tsk2.Get(Tsk.PercentComplete));

If your issue is not resolved, please explain in detail where are you getting percentage complete as 99% using Aspose.Tasks. We will try to reproduce the issue and provide assistance accordingly.

Hi Muhammad,


Thanks for the quick reply. When I am debugging I am getting the percentage complete as 100% only.
But when I open the generated mpp file in Microsoft Project the task percentage completion is showing as 99% even it is completed. But when I open the same mpp file in online MPP viwer like https://www.projectplan365.com/projectviewernow/tViews.aspx the percentationcompletion is showing as 100%. Not sure what is the problem

Hi Nishanth,


I have tested the scenario again using latest library and observed that after setting the IsActive flag, it still shows 100 in the resultant MPP file. Here both the source and resultant files are attached for your reference along with the image of result file opened in MSP 2010. Please give a try using latest library Aspose.Tasks for .NET 9.2.1 and my sample source MPP file “SingleTask.mpp” and share the feedback.