Aspose.Tasks for .NET 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

Public API and Backwards Incompatible Changes

The following public types were added:Description
Aspose.Tasks.Primavera.PrimaveraActivityTypeSpecifies type of Primavera activity.
Aspose.Tasks.Primavera.PrimaveraDurationTypeSpecifies duration type of Primavera activity.
Aspose.Tasks.Primavera.PrimaveraPercentCompleteTypeSpecifies value of ‘% Complete Type’ field for Primavera activities.
Aspose.Tasks.Primavera.PrimaveraRelationshipLagCalendarSpecifies which calendar to use for scheduling Relationship Lag in Primavera projects.
Aspose.Tasks.PrimaveraBaseReaderRepresents a base reader which can be used to read Project UIDs from multi project Primavera XER or XML files.
Aspose.Tasks.PrimaveraProjectPropertiesRepresents Primavera-specific properties for a project read from Primavera files (XER of P6XML).
The following public methods and properties were added:Description
Aspose.Tasks.PrimaveraBaseReader.#ctor(System.String)Initializes a new instance of the class.
Aspose.Tasks.PrimaveraBaseReader.#ctor(System.IO.Stream)Initializes a new instance of the class.
Aspose.Tasks.PrimaveraBaseReader.LoadFromStream(System.IO.Stream)Reads multi project data from the provided stream.
Aspose.Tasks.PrimaveraBaseReader.GetProjectUidsReturn a list of the projects’ unique identifiers.
Aspose.Tasks.PrimaveraBaseReader.LoadProject(System.Int32)Loads the project with the specified unique identifier.
Aspose.Tasks.PrimaveraProjectProperties.RelationshipLagCalendarGets an options which defines which calendar to use for scheduling Relationship Lag in Primavera projects
Aspose.Tasks.PrimaveraProjectProperties.UseExpectedFinishDatesGets a flag which defines whether activity finish dates should be scheduled as the expected finish dates.
Aspose.Tasks.PrimaveraProjectProperties.MakeOpenEndedActivitiesCriticalGets a flag which defines whether activities should me marked as critical when scheduling the project.
Aspose.Tasks.PrimaveraProjectProperties.IgnoreOtherProjectRelationshipsGets a flag which defines whether to ignore activity relationships between projects.
Aspose.Tasks.PrimaveraTaskProperties.DurationTypeGets the value of ‘Duration Type’ field of the activity.
Aspose.Tasks.PrimaveraTaskProperties.ActivityTypeGets the value of ‘Activity Type’ field.
Aspose.Tasks.PrimaveraTaskProperties.PercentCompleteTypeGets the value of ‘% Complete Type’ field of the activity.
Aspose.Tasks.PrimaveraTaskProperties.ActualLaborCostGets the value of actual labor cost .
Aspose.Tasks.PrimaveraTaskProperties.ActualNonlaborCostGets the value of actual non labor cost .
Aspose.Tasks.PrimaveraTaskProperties.ActualMaterialCostGets the value of actual material cost.
Aspose.Tasks.PrimaveraTaskProperties.ActualExpenseCostGets the value of actual expense cost.
Aspose.Tasks.PrimaveraTaskProperties.RemainingExpenseCostGets the value of remaining expense cost.
Aspose.Tasks.PrimaveraTaskProperties.ActualTotalCostGets the total value of actual costs.
Aspose.Tasks.PrimaveraXmlReader.LoadFromStream(System.IO.Stream)Reads multi project data from the provided stream.
Aspose.Tasks.Project.PrimaveraPropertiesGets an object containing Primavera-specific properties for a project read from Primavera file.
Aspose.Tasks.ResourceAssignment.NotesTextGets or sets notes’ plain text extracted from RTF data.
Aspose.Tasks.ResourceAssignment.NotesRTFGets or sets the text notes in RTF format.
The following public methods and properties were deleted:Description
Aspose.Tasks.PrimaveraXerReader.GetProjectUidsWas moved to base type PrimaveraBaseReader.
Aspose.Tasks.PrimaveraXmlReader.GetProjectUidsWas moved to base type PrimaveraBaseReader.
The following public enumerations were added:Description
Aspose.Tasks.Asn.NotesTextNotes’ plain text extracted from RTF data.
Aspose.Tasks.Asn.NotesRTFThe text notes in RTF format.
Aspose.Tasks.AsnKey.NotesTextRepresents the NotesText (ResourceAssignment) field.
Aspose.Tasks.AsnKey.NotesRTFRepresents the NotesRTF (ResourceAssignment) field.
Aspose.Tasks.Primavera.PrimaveraActivityType.NoneNot specified or not applicable.
Aspose.Tasks.Primavera.PrimaveraActivityType.StartMilestoneStart Milestone’ activity type
Aspose.Tasks.Primavera.PrimaveraActivityType.FinishMilestoneFinish Milestone’ activity type
Aspose.Tasks.Primavera.PrimaveraActivityType.TaskDependentTask Dependent’ activity type
Aspose.Tasks.Primavera.PrimaveraActivityType.ResourceDependentResource Dependent’ activity type
Aspose.Tasks.Primavera.PrimaveraActivityType.LevelOfEffortLevel Of Effort’ activity type
Aspose.Tasks.Primavera.PrimaveraActivityType.WbsSummaryWBS Summary’ activity type
Aspose.Tasks.Primavera.PrimaveraDurationType.NoneNot specified or not applicable.
Aspose.Tasks.Primavera.PrimaveraDurationType.FixedDurationUnitsFixed Duration And Units’ duration type
Aspose.Tasks.Primavera.PrimaveraDurationType.FixedDurationUnitsTimeFixed Duration And Units/Time’ duration type
Aspose.Tasks.Primavera.PrimaveraDurationType.FixedUnitsFixed Units’ duration type
Aspose.Tasks.Primavera.PrimaveraDurationType.FixedUnitsTimeFixed Units/Time’ duration type
Aspose.Tasks.Primavera.PrimaveraPercentCompleteType.NoneNot specified or not applicable.
Aspose.Tasks.Primavera.PrimaveraPercentCompleteType.DurationDuration % Complete type.
Aspose.Tasks.Primavera.PrimaveraPercentCompleteType.PhysicalPhysical % Complete type.
Aspose.Tasks.Primavera.PrimaveraPercentCompleteType.UnitsUnits % Complete type.
Aspose.Tasks.Primavera.PrimaveraRelationshipLagCalendar.PredecessorUse predecessor activity calendar
Aspose.Tasks.Primavera.PrimaveraRelationshipLagCalendar.SuccessorUse successor activity calendar
Aspose.Tasks.Primavera.PrimaveraRelationshipLagCalendar.Calendar24HourUse 24 Hours calendar
Aspose.Tasks.Primavera.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:

var project = new Project();
Console.WriteLine("View count: {0}", project.Views.Count);
var ganttChartView = (GanttChartView) project.DefaultView;
Console.WriteLine("New project's default view : {0}", ganttChartView.Name);

TableField field = new TableField()
{
    Field = Field.TaskStatus,
    AlignData = StringAlignment.Center,
    Width = 30,
    AlignTitle = StringAlignment.Near,
    Title = "Task status"
};

ganttChartView.Table.TableFields.Add(field);
project.Save("output.mpp", new MPPSaveOptions() { WriteViewData = true }); // WriteViewData should be specified in order to persist changes related to view data.

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

Read-only DurationType, ActivityType and PercentCompleteType properties were added to PrimaveraTaskProperties type.

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

foreach (var t in project.EnumerateAllChildTasks())
{
    Console.WriteLine("Task: {0}", t.Name);
    Console.WriteLine("ActivityType: {0}", t.PrimaveraProperties.ActivityType);
    Console.WriteLine("DurationType: {0}", t.PrimaveraProperties.DurationType);
    Console.WriteLine("PercentCompleteType: {0}", t.PrimaveraProperties.PercentCompleteType);
    Console.WriteLine();
}

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

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

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

Console.WriteLine("Project properties: ");
Console.WriteLine("IgnoreOtherProjectRelationships: {0}", project.PrimaveraProperties.IgnoreOtherProjectRelationships);
Console.WriteLine("MakeOpenEndedActivitiesCritical: {0}", project.PrimaveraProperties.MakeOpenEndedActivitiesCritical);
Console.WriteLine("RelationshipLagCalendar: {0}", project.PrimaveraProperties.RelationshipLagCalendar);
Console.WriteLine("UseExpectedFinishDates: {0}", project.PrimaveraProperties.UseExpectedFinishDates);

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

ActualExpenseCost, RemainingExpenseCost, ActualLaborCost, ActualMaterialCost, ActualNonlaborCost, ActualTotalCost properties were added to PrimaveraTaskProperties type. The properties can be used to access cost info for projects read from XER or Primavera XML formats.

var project = new Project("Costs.xer");
foreach (var t in project.EnumerateAllChildTasks())
{
    Console.WriteLine("Task: {0}", t.Name);
    Console.WriteLine("ActualLaborCost: {0}", t.PrimaveraProperties.ActualLaborCost);
    Console.WriteLine("ActualNonlaborCost: {0}", t.PrimaveraProperties.ActualNonlaborCost);
    Console.WriteLine("ActualMaterialCost: {0}", t.PrimaveraProperties.ActualMaterialCost);
    Console.WriteLine("ActualExpenseCost: {0}", t.PrimaveraProperties.ActualExpenseCost);
    Console.WriteLine("RemainingExpenseCost: {0}", t.PrimaveraProperties.RemainingExpenseCost);
    Console.WriteLine("ActualTotalCost: {0}", t.PrimaveraProperties.ActualTotalCost);
    Console.WriteLine();
}

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

Now Task, Resource and ResourceAssigmnent entities have 2 properties:
NotesText for accessing note’s plain text and NotesRTF for accessing note in RTF format.

Rsc.Notes and Asn.Notes properties were marked as obsolete.