Browse our Products

Aspose.Tasks for Java 23.3 Release Notes

All Changes

KeySummaryIssue Type
TASKSNET-10802Add reading and writing of assignment’s hyperlink from / to MPP formatEnhancement
TASKSNET-10794Add enum-typed DurationType, ActivityType and PercentCompletetype properties to PrimaveraTaskPropertiesEnhancement
TASKSNET-10788Add “LoadProject” method to PrimaveraXmlReader and PrimaveraXerReaderEnhancement
TASKSNET-10784Add initialization of View data in projects read from non-MPP formatEnhancement
TASKSNET-10771Add reading of ‘Calendar for Scheduling Relationship Lag’ from Primavera XML and XER formatsEnhancement
TASKSNET-10768Add reading of ActualExpenseCost, RemainingExpenseCost, ActualLaborCost, ActualMaterialCost, ActualNonlaborCost, ActualTotalCost for projects read from XER of Primavera P6XML formatsEnhancement
TASKSNET-4180Implement consistent API for Task, Resource, Assignment notesEnhancement
TASKSNET-10804Fix reading and writing of Leveling Delay field from \ to MPP formatBug
TASKSNET-10796Fix writing of Task.Hyperlink to MPP fileBug
TASKSNET-10786Fix writing of changes in base calendarsBug
TASKSNET-10767Fix duration of some tasks are changed after recalculating project saved by Aspose.TasksBug
TASKSJAVA-237Incorrect image layout after exportBug

Public API and Backwards Incompatible Changes

The following public types were added:Description
com.aspose.tasks.PrimaveraActivityTypeSpecifies type of Primavera activity.
com.aspose.tasks.PrimaveraDurationTypeSpecifies duration type of Primavera activity.
com.aspose.tasks.PrimaveraPercentCompleteTypeSpecifies value of ‘% Complete Type’ field for Primavera activities.
com.aspose.tasks.PrimaveraRelationshipLagCalendarSpecifies which calendar to use for scheduling Relationship Lag in Primavera projects.
com.aspose.tasks.PrimaveraBaseReaderRepresents a base reader which can be used to read Project UIDs from multi project Primavera XER or XML files.
com.aspose.tasks.PrimaveraProjectPropertiesRepresents Primavera-specific properties for a project read from Primavera files (XER of P6XML).
The following public methods were added:Description
com.aspose.tasks.PrimaveraBaseReader.#ctor(java.lang.String)Initializes a new instance of the class.
com.aspose.tasks.PrimaveraBaseReader.#ctor(java.io.InputStream)Initializes a new instance of the class.
com.aspose.tasks.PrimaveraBaseReader.loadFromStream(java.io.InputStream)Reads multi project data from the provided stream.
com.aspose.tasks.PrimaveraBaseReader.getProjectUids()Return a list of the projects’ unique identifiers.
com.aspose.tasks.PrimaveraBaseReader.loadProject(int)Loads the project with the specified unique identifier.
com.aspose.tasks.PrimaveraProjectProperties.getRelationshipLagCalendar()Gets an options which defines which calendar to use for scheduling Relationship Lag in Primavera projects
com.aspose.tasks.PrimaveraProjectProperties.getUseExpectedFinishDates()Gets a flag which defines whether activity finish dates should be scheduled as the expected finish dates.
com.aspose.tasks.PrimaveraProjectProperties.getMakeOpenEndedActivitiesCritical()Gets a flag which defines whether activities should me marked as critical when scheduling the project.
com.aspose.tasks.PrimaveraProjectProperties.getIgnoreOtherProjectRelationships()Gets a flag which defines whether to ignore activity relationships between projects.
com.aspose.tasks.PrimaveraTaskProperties.getDurationType()Gets the value of ‘Duration Type’ field of the activity.
com.aspose.tasks.PrimaveraTaskProperties.getActivityType()Gets the value of ‘Activity Type’ field.
com.aspose.tasks.PrimaveraTaskProperties.getPercentCompleteType()Gets the value of ‘% Complete Type’ field of the activity.
com.aspose.tasks.PrimaveraTaskProperties.getActualLaborCost()Gets the value of actual labor cost .
com.aspose.tasks.PrimaveraTaskProperties.getActualNonlaborCost()Gets the value of actual non labor cost .
com.aspose.tasks.PrimaveraTaskProperties.getActualMaterialCost()Gets the value of actual material cost.
com.aspose.tasks.PrimaveraTaskProperties.getActualExpenseCost()Gets the value of actual expense cost.
com.aspose.tasks.PrimaveraTaskProperties.getRemainingExpenseCost()Gets the value of remaining expense cost.
com.aspose.tasks.PrimaveraTaskProperties.getActualTotalCost()Gets the total value of actual costs.
com.aspose.tasks.PrimaveraXmlReader.loadFromStream(java.io.InputStream)Reads multi project data from the provided stream.
com.aspose.tasks.Project.getPrimaveraProperties()Gets an object containing Primavera-specific properties for a project read from Primavera file.
com.aspose.tasks.ResourceAssignment.getNotesText()Gets notes’ plain text extracted from RTF data.
com.aspose.tasks.ResourceAssignment.setNotesText(java.lang.String)Sets notes’ plain text extracted from RTF data.
com.aspose.tasks.ResourceAssignment.getNotesRTF()Gets the text notes in RTF format.
com.aspose.tasks.ResourceAssignment.setNotesRTF(java.lang.String)Sets the text notes in RTF format.
The following public methods were deleted:Description
com.aspose.tasks.PrimaveraXerReader.getProjectUids()Was moved to base type PrimaveraBaseReader.
com.aspose.tasks.PrimaveraXmlReader.getProjectUids()Was moved to base type PrimaveraBaseReader.
The following public enumerations were added:Description
com.aspose.tasks.Asn.NOTES_TEXTNotes’ plain text extracted from RTF data.
com.aspose.tasks.Asn.NOTES_RTFThe text notes in RTF format.
com.aspose.tasks.AsnKey.NotesTextRepresents the NotesText (ResourceAssignment) field.
com.aspose.tasks.AsnKey.NotesRTFRepresents the NotesRTF (ResourceAssignment) field.
com.aspose.tasks.PrimaveraActivityType.NoneNot specified or not applicable.
com.aspose.tasks.PrimaveraActivityType.StartMilestoneStart Milestone’ activity type
com.aspose.tasks.PrimaveraActivityType.FinishMilestoneFinish Milestone’ activity type
com.aspose.tasks.PrimaveraActivityType.TaskDependentTask Dependent’ activity type
com.aspose.tasks.PrimaveraActivityType.ResourceDependentResource Dependent’ activity type
com.aspose.tasks.PrimaveraActivityType.LevelOfEffortLevel Of Effort’ activity type
com.aspose.tasks.PrimaveraActivityType.WbsSummaryWBS Summary’ activity type
com.aspose.tasks.PrimaveraDurationType.NoneNot specified or not applicable.
com.aspose.tasks.PrimaveraDurationType.FixedDurationUnitsFixed Duration And Units’ duration type
com.aspose.tasks.PrimaveraDurationType.FixedDurationUnitsTimeFixed Duration And Units/Time’ duration type
com.aspose.tasks.PrimaveraDurationType.FixedUnitsFixed Units’ duration type
com.aspose.tasks.PrimaveraDurationType.FixedUnitsTimeFixed Units/Time’ duration type
com.aspose.tasks.PrimaveraPercentCompleteType.NoneNot specified or not applicable.
com.aspose.tasks.PrimaveraPercentCompleteType.DurationDuration % Complete type.
com.aspose.tasks.PrimaveraPercentCompleteType.PhysicalPhysical % Complete type.
com.aspose.tasks.PrimaveraPercentCompleteType.UnitsUnits % Complete type.
com.aspose.tasks.PrimaveraRelationshipLagCalendar.PredecessorUse predecessor activity calendar
com.aspose.tasks.PrimaveraRelationshipLagCalendar.SuccessorUse successor activity calendar
com.aspose.tasks.PrimaveraRelationshipLagCalendar.Calendar24HourUse 24 Hours calendar
com.aspose.tasks.PrimaveraRelationshipLagCalendar.DefaultUse project default calendar

Examples and additional notes

Related issue: TASKSNET-10784 - Add initialization of View data in projects read from non-MPP format.

Starting with 23.3 View data for project created without template or loaded from non-MPP file is initialized with default values when View-related properties are accessed. Prior to 23.3 view data was populated when project was saved to MPP file.

Now a view data can be modified in the following way:

Project project = new Project();
System.out.println("View count: " + project.getViews().size());
GanttChartView ganttChartView = (GanttChartView) project.getDefaultView();
System.out.println("New project's default view : " + ganttChartView.getName());

TableField field = new TableField();
field.setField(Field.TaskStatus);
field.setAlignData(StringAlignment.Center);
field.setWidth(30);
field.setAlignTitle(StringAlignment.Near);
field.setTitle("Task status");

MPPSaveOptions saveOptions = new MPPSaveOptions();
saveOptions.setWriteViewData(true); // WriteViewData should be specified in order to persist changes related to view data.
project.save("output.mpp", saveOptions);

Related issue: TASKSNET-10794 - Add enum-typed DurationType, ActivityType and PercentCompletetype properties to PrimaveraTaskProperties

getDurationType(), getActivityType() and getPercentCompleteType() methods were added to PrimaveraTaskProperties type.

PrimaveraXerReader reader = new PrimaveraXerReader("input.xer");
var uids = reader.getProjectUids();
var project = reader.LoadProject(uids[0]);

for (Task t : project.enumerateAllChildTasks()) {
    System.out.println("Task: " + t.getName());
    System.out.println("ActivityType: " + t.getPrimaveraProperties().getActivityType());
    System.out.println("DurationType: " + t.getPrimaveraProperties().getDurationType());
    System.out.println("PercentCompleteType: " + t.getPrimaveraProperties().getPercentCompleteType());
    System.out.println();
}

Related issue: TASKSNET-10771 - Add reading of ‘Shedule Options’ from Primavera XML and XER formats

Project.getPrimaveraProperties() method was added to allow accessing of project’s Primavera-specific properties. The method returns null if source file doesn’t contain project’s Schedule Options.

Project project = new Project("ScheduleOptions.xer");

System.out.println("Project properties: ");
System.out.println("IgnoreOtherProjectRelationships: " + project.getPrimaveraProperties().getIgnoreOtherProjectRelationships());
System.out.println("MakeOpenEndedActivitiesCritical: " + project.getPrimaveraProperties().getMakeOpenEndedActivitiesCritical());
System.out.println("RelationshipLagCalendar: " + project.getPrimaveraProperties().getRelationshipLagCalendar());
System.out.println("UseExpectedFinishDates: " + project.getPrimaveraProperties().getUseExpectedFinishDates());

Related issue: TASKSNET-10768 - Add reading of ActualExpenseCost, RemainingExpenseCost, ActualLaborCost, ActualMaterialCost, ActualNonlaborCost, ActualTotalCost for projects read from XER of Primavera P6XML formats.

getActualExpenseCost(), getRemainingExpenseCost(), getActualLaborCost(), getActualMaterialCost(), getActualNonlaborCost(), getActualTotalCost() methods were added to PrimaveraTaskProperties type. The methods can be used to access cost info for projects read from XER or Primavera XML formats.

Project project = new Project("Costs.xer");
for (Task t : project.enumerateAllChildTasks()) {
    System.out.println("Task: " + t.getName());
    System.out.println("ActualLaborCost: " + t.getPrimaveraProperties().getActualLaborCost());
    System.out.println("ActualNonlaborCost: " + t.getPrimaveraProperties().getActualNonlaborCost());
    System.out.println("ActualMaterialCost: " + t.getPrimaveraProperties().getActualMaterialCost());
    System.out.println("ActualExpenseCost: " + t.getPrimaveraProperties().getActualExpenseCost());
    System.out.println("RemainingExpenseCost: " + t.getPrimaveraProperties().getRemainingExpenseCost());
    System.out.println("ActualTotalCost: " + t.getPrimaveraProperties().getActualTotalCost());
    System.out.println();
}

Related issue: TASKSNET-4180 - Implement uniform API for Task, Resource, Assignment notes.

Now Task, Resource and ResourceAssigmnent entities have 2 pairs of methods:
getNotesText() and setNotesText(java.lang.String) for accessing note’s plain text and getNotesRTF() and getNotesRTF(java.lang.String) for accessing note in RTF format.

Rsc.NOTES and Asn.NOTES fields were marked as obsolete.