Browse our Products

Aspose.Tasks for Java 21.3 Release Notes

All Changes

KeySummaryIssue Type
TASKSNET-4597Add support for ‘Task Summary Name’ field.Enhancement
TASKSNET-4642Add support for user-defined page size when saving project to graphical formatEnhancement
TASKSNET-4636Improve rendering of Gantt view page legend to use “adaptive” items layoutEnhancement
TASKSNET-4635Add handling of “AADSTS53003: Access has been blocked by Conditional Access policies.
The access policy does not allow token issuance.” error and return clear message to the user
Enhancement
TASKSNET-4632Fix Actual Duration while setting Actual Finish date of the taskEnhancement
TASKSNET-4467Improve support of XML baseline for MSP 2019Enhancement
TASKSNET-3585Add support of “RenderToSinglePage” option to TaskUsage, ResourceUsage,
TaskSheet and ResourceSheet views
Enhancement
TASKSNET-4631Fix incorrect position of not fit task labels when rendering Gantt chart viewBug
TASKSNET-4628Fix incorrect error message shown when trying to read a list of projects from empty Project Online accountBug
TASKSNET-4599Fix application of bar styles with non-default names when rendering Gantt chart viewBug
TASKSNET-4588Fix exception when trying to add a new task in XER projectBug
TASKSNET-4601Fix duplicated resources when reading XER of P6XML fileBug
TASKSNET-4668Fix recalculation of projects with external linksBug
TASKSNET-4667Fix ArgumentOutOfRangeException while recalculate a projectBug
TASKSNET-4666Fix NullReferenceException while recalculate the projectBug
TASKSNET-4644Fix XerPrimaveraReader to construct project with non broken integrityBug
TASKSNET-4640Fix System.OverflowException when trying to save password-protected project twiceBug
TASKSNET-4611Fix exception when opening specific password protected MPPBug
TASKSNET-4608Portrait/Landscape orientation setting ignored when printing / saving to PDFBug
TASKSNET-4604Fix current timescale position is reset when the project is saved by Aspose.TasksBug
TASKSNET-4410Content of a resource’s notes is not shown in MS ProjectBug
TASKSNET-4051Fix calculating of duration while convert MPP formatBug

Public API and Backwards Incompatible Changes

The following public methods and properties were added:Description
com.aspose.tasks.View.forViewScreen(/ViewScreen/ int)Constructs a new instance of the class which can be displayed in the specified ViewScreen.
com.aspose.tasks.SaveOptions.CustomPageSizeGets or sets the custom page size in points (1 point = 1/72 of inch).
com.aspose.tasks.SaveOptions.RenderToSinglePageGets or sets a value indicating whether image should be rendered to a single page. Currently is supported for Gantt chart view.
com.aspose.tasks.PageSettings.PaperSizeIdGets or sets an integer representing one of the PrinterPaperSize values or a custom page size id.
The following public enumerations were added:Description
com.aspose.tasks.Shape.DiamondIndicates Diamond shape.
com.aspose.tasks.TaskSummaryNameThe name of the summary task associated with the task.
com.aspose.tasks.PageSize.DefinedInViewUse page size defined in View’s (View.PageInfo.PageSettings).
com.aspose.tasks.PrinterPaperSize.CustomIndicates that the paper size is defined by the user.
com.aspose.tasks.PrinterPaperSize.PaperLetterSmallIndicates Small Letter printer paper size (8.5 in. by 11 in.).
com.aspose.tasks.PrinterPaperSize.PaperLedgerIndicates Ledger printer paper size (17 in. by 11 in.).
com.aspose.tasks.PrinterPaperSize.PaperStatementIndicates Statement printer paper size (5.5 in. by 8.5 in.).
com.aspose.tasks.PrinterPaperSize.PaperA4SmallIndicates Small A4 printer paper size (210 mm by 297 mm).
com.aspose.tasks.PrinterPaperSize.PaperA5Indicates A5 printer paper size (148 mm by 210 mm).
com.aspose.tasks.PrinterPaperSize.PaperFolioIndicates Folio printer paper size (8.5 in. by 13 in.).
com.aspose.tasks.PrinterPaperSize.PaperQuartoIndicates Quarto printer paper size (215 mm by 275 mm).
com.aspose.tasks.PrinterPaperSize.PaperStandard10x14Indicates Standard printer paper size (10 in. by 14 in.).
com.aspose.tasks.PrinterPaperSize.PaperStandard11x17Indicates Standard printer paper size (11 in. by 17 in.).
com.aspose.tasks.PrinterPaperSize.PaperNoteIndicates Note printer paper size (8.5 in. by 11 in.).
com.aspose.tasks.PrinterPaperSize.PaperCSheetIndicates C paper printer paper size (17 in. by 22 in.).
com.aspose.tasks.PrinterPaperSize.PaperDSheetIndicates D paper printer paper size (22 in. by 34 in.).
com.aspose.tasks.PrinterPaperSize.PaperESheetIndicates E paper printer paper size (34 in. by 44 in.).
com.aspose.tasks.PrinterPaperSize.PaperStandard9x11Indicates Standard printer paper size (9 in. by 11 in.).
com.aspose.tasks.PrinterPaperSize.PaperStandard10x11Indicates Standard printer paper size (10 in. by 11 in.).
com.aspose.tasks.PrinterPaperSize.PaperStandard15x11Indicates Standard printer paper size (15 in. by 11 in.).
com.aspose.tasks.PrinterPaperSize.PaperA2Indicates A2 printer paper size (420 mm by 594 mm).

Examples

Related issue: TASKSNET-4597 - Field ‘TaskSummaryName’ can be used in view’s columns

In order to show ‘TaskSummaryName’ column in exported document the next code sample can be used:

TableField field = new TableField();
field.setField(Field.TaskSummaryName);
field.setTitle("Task Summary Name");
field.setWidth(30);

project.getViews().toList().get(0).getTable().getTableFields().add(field);

Related issue: TASKSNET-4642 - Add support for user-defined page size when saving a project to a graphical format

SaveOptions.CustomPageSize property added so the user can specify custom page size when saving a project to graphical formats.

Project project = new Project("test.mpp");
ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFileFormat.PNG);
saveOptions.setTimescale(Timescale.DefinedInView);
saveOptions.setCustomPageSize(new java.awt.Dimension(1224, 340));
saveOptions.setStartDate(new GregorianCalendar(2012, Calendar.DECEMBER, 22).getTime());
saveOptions.setEndDate(new GregorianCalendar(2013, Calendar.MAY, 10).getTime());
saveOptions.setPresentationFormat(PresentationFormat.ResourceUsage);
project.save("output.png", saveOptions);

Related issue: TASKSNET-3585 - Add support of “RenderToSinglePage” option to TaskUsage, ResourceUsage, TaskSheet and ResourceSheet views

Now SaveOptions.RenderToSinglePage property can be used to specify that the project should be rendered to single page document. In this case the size of the page is adjusted to fit project on one page. SaveOptions.RenderToSinglePage flag is applicable when project is saved to PDF or graphical formats.

Project project = new Project("test.mpp");

PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setTimescale(Timescale.DefinedInView);
saveOptions.setRenderToSinglePage(true);
saveOptions.setStartDate(new GregorianCalendar(2012, Calendar.DECEMBER, 22).getTime());
saveOptions.setEndDate(new GregorianCalendar(2013, Calendar.MAY, 10).getTime());
saveOptions.setPresentationFormat(PresentationFormat.TaskUsage);

project.save("output.pdf", saveOptions);
Project project = new Project("TestProject.mpp");

ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFileFormat.PNG);
saveOptions.setTimescale(Timescale.DefinedInView);
saveOptions.setRenderToSinglePage(true);
saveOptions.setStartDate(new GregorianCalendar(2012, Calendar.DECEMBER, 22).getTime());
saveOptions.setEndDate(new GregorianCalendar(2013, Calendar.MAY, 10).getTime());
saveOptions.setPresentationFormat(PresentationFormat.TaskUsage);
saveOptions.setHorizontalResolution(300);
saveOptions.setVerticalResolution(300);

project.save("output.png", saveOptions);

Related issue: TASKSNET-4608 - Portrait/Landscape orientation setting ignored when printing / saving to pdf

Added PageSize.DefinedInView enum value so the user can specify that the project should be rendered using page size and page orientation settings defined in view’s settings. These settings can be changed using “Page Setup” dialog of Microsoft Project.

Project project = new Project("test.mpp");
View view = null;
for (View v : project.getViews()) {
    if (v.getScreen() == ViewScreen.Gantt) {
        view = v;
        break;
    }
}

System.out.println("Page size specified in view settings: "
        + PrinterPaperSize.toString(PrinterPaperSize.class, view.getPageInfo().getPageSettings().getPaperSize())
);
System.out.println("Page orientation: " 
        + (view.getPageInfo().getPageSettings().isPortrait() ? "Portrait" : "Landscape")
);

ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFileFormat.PNG);
saveOptions.setPageSize(PageSize.DefinedInView);
saveOptions.setTimescale(Timescale.DefinedInView);
saveOptions.setStartDate(new GregorianCalendar(2012, Calendar.DECEMBER, 22).getTime());
saveOptions.setEndDate(new GregorianCalendar(2013, Calendar.MAY, 10).getTime());
saveOptions.setPresentationFormat(PresentationFormat.GanttChart);
project.save("output.png", saveOptions);