getTaskDocumentWithFormat fails when baseline start/finish columns are empty for some tasks

Hi there,

when using the getTaskDocumentWithFormat function to transform from mpp to xml, we found the following error is thrown:

TimeScaledParentCostUnit.Finish should be initialized properly.

It is thrown, whenever the mpp file has baseline data attached, in which some of the tasks have empty (N/A) values within the baseline columns (specifically Baseline Start and Baseline Finish). Since it seems common to not have baseline data set for some tasks (e.g., newly created tasks after the baseline was set), I believe this is something that should be fixed! Thanks for your help!

@lasse.steffen

You’re encountering an error with getTaskDocumentWithFormat when converting from MPP to XML using Aspose.Tasks Cloud SDK, specifically:

TimeScaledParentCostUnit.Finish should be initialized properly.

This occurs when some tasks in the MPP file have baseline data defined, but certain tasks contain empty or N/A values in baseline fields such as Baseline Start and Baseline Finish — a common scenario when new tasks are added after a baseline has been set.

Similar conversion issues between MPP and XML formats have been discussed in the Aspose forum, particularly around data consistency during round-trip conversions (MPP → XML → MPP) [1, 2, 5]. In one case, Aspose support acknowledged an ongoing investigation into conversion reliability for these formats, suggesting potential limitations in handling partially populated task data .

The current implementation appears to require properly initialized Finish timestamps in time-scaled data units, even for tasks with incomplete baseline data.

Hypothesis

The error may occur because the conversion process attempts to compute time-scaled parent cost or work data, but fails when child tasks have null or undefined baseline start/finish dates, resulting in an improperly initialized TimeScaledParentCostUnit.

Next Steps

This behavior affects valid project scheduling patterns and should be addressed. To help move toward a resolution:

  • If possible, share a minimal sample MPP file (with anonymized task names) that reproduces the issue.
  • As a temporary workaround, test whether the conversion succeeds when baseline data is removed or fully populated.

We will escalate this for further investigation and provide updates here. Thank you for reporting this scenario.

@lasse.steffen ,

I’ve performed the following steps and cannot reproduce the issue :

  1. created new project
  2. added tasks, resource and assignments
  3. set the project’s baseline
  4. added new task without baseline data.
    [steps 1-4 were performed using MS Project.]
  5. opened the resulting mpp file using Aspose.Tasks and exported it to the XML format.

Can you attach the input MPP file so we can reproduce the issue on our side?