Browse our Products

Aspose.Tasks for Java 21.7 Release Notes

All Changes

KeySummaryIssue Type
TASKSNET-4903Add ExecutingWebRequest event for interactions with API of ProjectOnline \ ProjectServer.Enhancement
TASKSJAVA-1186Support of display Ole as Icon property: getDisplayAsIcon missing from Tasks libraryEnhancement
TASKSJAVA-1212When exporting MPP, the percentages do not correspond to the set valueEnhancement
TASKSNET-4908Fix resaving of the specific MPP file throws ArgumentOutOfRangeExceptionBug
TASKSNET-4907Fix resaving of the specific MPP file throws ‘Project writing exception’Bug
TASKSJAVA-982Ole object frame remains even after removing ole objectBug
TASKSJAVA-1380Same hours planned for resources with different hour assignedBug
TASKSNET-4866Fix setting of assigned task duration not recalculating correctly for the first taskBug
TASKSNET-4854Fix updating of assignment’s TimephasedDataBug
TASKSNET-4850Fix “File reading error.” exception when open document MPX fileBug
TASKSNET-4734Fix failed resave to MPX formatBug

Public API and Backwards Incompatible Changes

The following public types were added:Description
com.aspose.tasks.FillPatternFill pattern used in middle shape of a gantt bar.
com.aspose.tasks.HorizontalAlignmentSpecifies how an object or text is horizontally aligned relative to another object.
com.aspose.tasks.VisualObjectPlacementRepresents placement and appearance of in a view.
com.aspose.tasks.WebRequestEventArgsProvides arguments for the event that is raised when the client sends a web request to the Project Server’s web API.
The following public methods and properties were added:Description
com.aspose.tasks.OleObject.IdGets the object id.
com.aspose.tasks.OleObject.DisplayAsIconGets a flag indicating that OLE object should be shown either as an icon or as its regular picture.
com.aspose.tasks.ProjectServerManager.ExecutingWebRequestAn event that is raised when the web request is sent to Project Server’s web API.
com.aspose.tasks.VisualObjectsPlacementsGets a collection of objects representing placement and appearance of in the view.
com.aspose.tasks.VisualObjectPlacement.OleObjectIdGets Id of object.
com.aspose.tasks.VisualObjectPlacement.TaskIdGets Id of task if ‘Attach to task’ options is selected, -1 otherwise.
com.aspose.tasks.VisualObjectPlacement.WidthGets displayed width of visual object.
com.aspose.tasks.VisualObjectPlacement.HeightGets displayed height of visual object.
com.aspose.tasks.VisualObjectPlacement.VerticalOffsetGets vertical offset of visual object.
com.aspose.tasks.VisualObjectPlacement.HorizontalOffsetGets horizontal offset of visual object.
com.aspose.tasks.VisualObjectPlacement.TimescaleDateGets date placement of visual object when ‘Attach to timescale’ options is selected.
com.aspose.tasks.VisualObjectPlacement.AttachmentPointGets alignment of visual object relative to a task when ‘Attach to task’ options is selected.
com.aspose.tasks.VisualObjectPlacement.BorderLineColorGets border line color.
com.aspose.tasks.VisualObjectPlacement.BorderLineThicknessGets border line thickness (allowed values are 0 - 5).
com.aspose.tasks.VisualObjectPlacement.FillColorGets fill color. Set to to set the fill to ‘None’.
com.aspose.tasks.VisualObjectPlacement.FillPatternGets fill pattern.
com.aspose.tasks.WebRequestEventArgs.WebRequestGets a web request to sent to the Project Server’s web API.
The following public enumerations were added:Description
com.aspose.tasks.TaskKey.SVRepresents the SV (Task) field.
com.aspose.tasks.Tsk.SVThe earned value schedule variance, through the project status date.
com.aspose.tasks.FillPattern.HollowHollow pattern.
com.aspose.tasks.FillPattern.SolidFillSolid fill pattern.
com.aspose.tasks.FillPattern.LightFillLight fill pattern.
com.aspose.tasks.FillPattern.MediumFillMedium fill pattern.
com.aspose.tasks.FillPattern.DarkFillDark fill pattern.
com.aspose.tasks.FillPattern.DiagonalLeftDiagonal left pattern.
com.aspose.tasks.FillPattern.DiagonalRightDiagonal right pattern.
com.aspose.tasks.FillPattern.DiagonalCrossDiagonal cross pattern.
com.aspose.tasks.FillPattern.LineVerticalLine vertical pattern.
com.aspose.tasks.FillPattern.LineHorizontalLine horizontal pattern.
com.aspose.tasks.FillPattern.LineCrossLine cross pattern.
com.aspose.tasks.FillPattern.SolidFillWithDashedBorderSolid with dashed border pattern.
com.aspose.tasks.HorizontalAlignment.LeftThe object is aligned on the left of the target element.
com.aspose.tasks.HorizontalAlignment.RightThe object is aligned on the right of the target element.

Examples and additional notes

Related issue: TASKSNET-4903 - Add ExecutingWebRequest event for interactions with API of ProjectOnline \ ProjectServer.

Now you can specify custom callback for WebRequest issued during interaction with Project Online \ Project Server via Project Web Access API:

ProjectServerCredentials credentials = new ProjectServerCredentials("http://myprojectserver/sites/pwa", "user", "pwd");
ProjectServerManager manager = new ProjectServerManager(credentials);
manager.setExecutingWebRequest(new Event<WebRequestEventArgs>() {
    @Override
    public void invoke(Object o, WebRequestEventArgs webRequestEventArgs) {
        webRequestEventArgs.getWebRequest().addRequestProperty("XMyCustomHeader", "testvalue");
    }
});
Related issue: TASKSJAVA-1186 - Support of display Ole as Icon property: getDisplayAsIcon missing from Tasks library.

Now you can read OleObject’s DisplayAsIcon property to determine whether OLE object should be displayed as icon or as its regular picture. Also new entity was introduced: VisualObjectPlacement which represents visual object’s (including OleObject) placement and apperance in a project’s view. It corresponds to “Format Drawing” dialog window called by “Properties” command from OleObject’s (or another visual object in a view) context menu:

Format Drawing

Project project = new Project("ProjectWithOleObjects.mpp");
View view = project.getViews().stream()
    .filter(v -> v.getName().equals("&Gantt Chart"))
    .findFirst()
    .orElseThrow(IllegalStateException::new);
OleObject oleObject = project.getOleObjects().stream()
    .filter(o -> o.getId() == 1)
    .findFirst()
    .orElseThrow(IllegalStateException::new);

System.out.println("First OLE object: " + oleObject.getName());
System.out.println("DisplayAsIcon: " + oleObject.getDisplayAsIcon());

VisualObjectPlacement oleObjectPlacement = view.getVisualObjectsPlacements().stream()
    .filter(v -> v.getOleObjectId() == 1)
    .findFirst()
    .orElseThrow(IllegalStateException::new);

System.out.println("BorderLineColor: " + oleObjectPlacement.getBorderLineColor());
System.out.println("BorderLineColor: " + oleObjectPlacement.getBorderLineThickness());

if (oleObjectPlacement.getTaskId() > 0) {
    System.out.println("Attached to task: " + oleObjectPlacement.getTaskId());
} else {
    System.out.println("Attached to timescale date: " + oleObjectPlacement.getTimescaleDate());
}