The completed task has no resources exported and the duration is lost

There is a very strange phenomenon. Although it does not appear in normal scenes, I still want to confirm it.
When generating a project plan, a task in the project plan has been completed, but there are no resources. After this data is exported, the construction period will also be lost. How to avoid this phenomenon (the situation of losing the construction period)?

BTW,its only exists in Project2013 V15.0.4420.1017
image.png (27.2 KB)

In 2013
img_v3_0275_b3a4e83b-6797-49bf-b395-9033ecdc455g.jpg (124.9 KB)

In Other
img_v3_0274_44f4efe3-c5bf-4899-bbd6-4f2bb659516g.jpg (102.6 KB)

@Jiangqiming ,

Could you share the resulting MPP file or input file + code used to export the resulting MPP file?

You can check this link https://github.com/jiangdu945/TempData/blob/main/LostDuration.mpp

@Jiangqiming ,
I do not see the same task names and dates as in your screenshots, but see that
tasks BBB0401, BBB0402, BBB0403 have percent complete 99%.

My MS Project version is 16.0.14332.20611.

I’ve examined the project using Aspose.Tasks for .NET 23.12 and found that
these tasks have PercentComplete property set to 99 and ActualFinish property is not set
(equal to DateTime.MinValue).
Finished tasks shoud have ActualFinish property set.

Could you check that your export code sets PercentComplete to 100 and ActualFinish property ?

Yes, the content of the entire plan is actually somewhat confidential, so some processing has been done.
This code has been debugged and the progress is indeed assigned 100%, but this is not the case when viewed in the mpp file. We have tested different Project versions, including 2010, 2013, 2016, 2019, and 2021. Except for Project2013 V15.0.4420.1017, all others can be displayed correctly.
In addition, in the test of project20123, we also used files that displayed abnormalities on version 4420.1017, but they were displayed correctly on version 4569.1506.
Hope this information helps you.

Sorry, I was send u a wrong link yesterday, please check this link :dizzy_face:

@Jiangqiming ,
we need some time to investigate the new file.

Hi,
Is there any progress ?

@Jiangqiming ,
the investigation is still in progress.

@Jiangqiming ,
we’ve found that the similar behavior can be reproduced when CalculationMode.Manual is used and task’s PercentComplete is set to 100 as in the following code:

Project project = new Project("NewProject2010.mpp");
project.CalculationMode = CalculationMode.Manual;
var t = project.RootTask.Children.Add("Task");
var t1 = t.Children.Add("Child1");
t1.Duration = project.GetDuration(3, TimeUnitType.Day);
t1.PercentComplete = 100;
```.

Do you use CalculationMode.Manual when exporting the project?

@Jiangqiming
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): TASKSNET-11092

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.