Reading Timephasedata for Materials Remaining Work with unexpected output

We are using Aspose task to read planned projects in MPP files

The case we were able to isolate is:

  • A single task with 2 resources, one work the other is material.
  • The task start at 2024-07-01 and end at 2025-09-30
  • The material work has actuals defined until June 2025, from that day on it has some values planned

When we are reading the file it imports the timephase data until March 2029, it feel like it distributed the planed values until 2029.

Example of MPP side by side with output.
example.png (280.2 KB)

Adicional notes:
We tried more recent versions (until 25.7) and we obtain the same result.
If we save the file as XML and then we use the XML version timephase data is according with the expected.

We are using:
Java 21
Aspose Tasks 25.3

Files used to replicate the problem
Import timephasedata 2.zip (959.3 KB)

In the attachment contains the files :

  • MainImportProject.java containing the code to grab the input file and generate the output
  • input_import1.mpp with the example case
  • example.png is the image attached in this ticket
  • Results.xlsx with resume of the problem

Thank you for your help in this matter

@Critical98

It sounds like you’re experiencing an issue with the time-phased data for materials in your MPP file, where the data is being extended unexpectedly to March 2029. This can occur due to how the library interprets the planned values, especially when actuals are defined only up to a certain date.

Cause: The unexpected extension of time-phased data may be due to incorrect resource assignments, improper date ranges during data retrieval, or potential issues with the MPP file itself.

Solution: Here’s a step-by-step approach to diagnose and resolve the issue:

  1. Check Resource Assignment: Ensure that the resource assignments for the material are correctly set up in your MPP file. Verify that the actuals and planned values are correctly defined for the expected duration.

  2. Review Timephased Data Retrieval: When retrieving time-phased data, ensure you are using the correct start and finish dates. Use the GetTimephasedData method, specifying the correct date range to limit the output.

  3. Inspect the MPP File: Open the MPP file in Microsoft Project and manually check the time-phased data for the material resource. This will help confirm if the issue lies with the data in the MPP file or with how Aspose.Tasks is reading it.

  4. Test with XML Format: Since saving the file as XML yields the expected results, consider using the XML format for reading time-phased data if feasible. This might help bypass the issue you’re encountering with the MPP format.

  5. Update Library Version: Ensure that you are using the latest version of Aspose.Tasks, as there may be bug fixes or improvements that address this issue.

Next Steps: Implement the above steps to diagnose the problem. If the issue persists, please provide additional details about your MPP file and the specific code you are using to retrieve the time-phased data.

Here’s a minimal code snippet to retrieve time-phased data correctly:

Project project = new Project("input_import1.mpp");
ResourceAssignment assignment = project.ResourceAssignments.get(0); // Adjust index as needed
List<TimephasedData> timephasedData = assignment.GetTimephasedData(assignment.Get(Asn.Start), assignment.Get(Asn.Finish), TimephasedDataType.AssignmentRemainingWork);
for (TimephasedData data : timephasedData) {
    System.out.println("Start: " + data.getStart() + ", Value: " + data.getValue());
}

This code retrieves the time-phased data for the specified resource assignment and prints the start date and value.

Please let me know if this helps or if you need further assistance!

@Critical98 ,
we will investigate the scenario and attached files and return with the answer later.

@Critical98
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-11532

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.

The issues you have found earlier (filed as TASKSNET-11532) have been fixed in this update.

Download link: https://releases.aspose.com/tasks/net/