Hi Kashif,
Please check the attached zip file.
1) Test Project.mpp contains 4 tasks (2 summary tasks & 2 leaf tasks), as well as a few noticeable fields:
- Text 18 is a formula custom field based on values of fields Text7 & Text8:
IIf([Text7]<>"" Or [Text8]<>"",[Text7] & “::” & [Text8],"")
- Text25 is a formula custom field based on the value of Baseline estimated Date:
IIf([Baseline Estimated Start]=projdatevalue(“NA”),"",Format([Baseline Estimated Start],“YYYY-MM-DD”))
- Text28 is a formula custom field based on field Baseline Work:
IIf(InStr(([Baseline Work]/60),’,’)>0,Cstr(Left(([Baseline Work]/60),(InStr(([Baseline Work]/60),’,’))-1)+Chr(46)+Right(([Baseline Work]/60),(Len(([Baseline Work]/60))-InStr(([Baseline Work]/60),’,’)))),([Baseline Work]/60))
As you can see, I did input some values for all the source fields, and calculated the project, which caused the formula custom fields to be filled, except Text18 for the summary tasks (I don’t quite know why, but this is some MSP behavior I guess).
If I change the source fields and press “calculate project”, the formula custom fields are updated. That’s the expected behavior.
2) I opened and immediately saved with file with Aspose, without doing any modifications. The result is saved in file “Test Project saved with Aspose.mpp”.
The only problem here is that Text25 now contains the date with the time, i.e. not what was in the initial MPP file (YYYY-MM-DD format). I think this part will be covered by the existing issue, as reading & writing this field seems to have the same problem.
3) What I did then is edit the source fields in the file saved by Aspose (Text 7, Text 8, Baseline Estimated Start and Baseline Work) for all the tasks, and I pressed "Calculate Project).
The expected behavior is that Custom formula fields will be updated accordingly, however that only worked for Text18, and Text25 leaf tasks, not Text25 summary tasks nor Text28. This worked fine before saving the file with Aspose, and don’t work anymore after saving the file with Aspose. That’s the new issue I’m referring to. It looks like Aspose will mess up with some (and only some) custom formula fields, maybe based on the type of the fields used in the formula. I didn’t tried source fields using lookups, but it’s also something that should be tested.
All tests done with MSP 2016.
Let me know if there’s anything you cannot reproduce.
Thanks!