Scripting and REST API improvements
The following improvements to the ConSol CM API and REST API have been made.
Joda-Time removed (#663194)
The library Joda-Time
, which is deprecated since ConSol CM version 6.15, has been removed.
You need to review your custom scripts, including scripts embedded in the workflow, on the Scripts page of the Web Admin Suite and check if Joda-Time
is used. All usages of Joda-Time
need to be replaced by the corresponding methods of the java.time
API or by the date and time methods provided by Groovy.
Server-side validation to avoid setting invalid enum values (#654864)
When setting a value for a field of the type Enumerated list in a script, it is now checked if the enum value exists in the respective list, in order to avoid saving invalid data. An exception occurs if a script tries to set an invalid enum value and a corresponding message is written to the log files.
New method to get history entries by text class (#664097)
It is now possible to easily retrieve all case history entries with a given text class. The ConSol CM API has been extended by two methods for this purpose:
- ticketContentService.getContentEntriesByClassName(Ticket pTicket, String pClassName)
- workflowApi.getEntriesByClassName(String pClassName)
New method to generate documents with headers and footers (#664264)
It is now possible to generate office documents with headers and footers from HTML content. This enhancement ensures that documents generated via the API can meet more complex formatting requirements, improving the overall quality and presentation of the documents.
The method generateWordDocumentFromXHTML(String pFileName, String pXHTML, PageLayoutConfig pHeader, PageLayoutConfig pFooter)
has been added to the class ContentFileTemplateService
for this purpose. The content of the header and footer is defined in an object of the new class PageLayoutConfig
, which allows to set basic formatting, such as font size, color, and position.
New method to retrieve the newly set assignee (#664580)
It is now possible to retrieve the user who is set as assignee within the current transaction. The method getLatestEngineer()
has been added to the interface TicketGroovyExtension
for this purpose.
Therefore, the following methods to retrieve assignees exist:
Ticket.getEngineer()
: Retrieves the currently persisted user, i.e. the one saved in the database.Ticket.getLatestEngineer()
: Retrieves the currently assigned user, i.e. the one which will be saved to the database when the transaction finishes.
The new method is especially useful when reacting on assignee changes when the user selects a new assignee in an activity form.