Reads and parses checklist data from a custom field on a Polarion object. Returns a Checklist object containing all checklist items, their states, and metadata. If a template is configured, the parsed checklist merges template items automatically.
Parameter
Type
Description
workItem
Work item object
The Polarion work item containing the checklist field
module
Document object
The Polarion LiveDoc containing the checklist field
testRun
Test run object
The Polarion test run containing the checklist field
plan
Plan object
The Polarion plan containing the checklist field
field
String
The custom field ID that stores the checklist data
Supported object types: work items, documents (LiveDocs), test runs, plans.Returns: A Checklist object with all items and their current states.
When you call parse(), the service automatically merges items from a configured template into the checklist. You can control this behavior with the nextedy.checklist._TYPEID._FIELDID._STATUS.mergeTemplate configuration property. Template merging can also be disabled after resolution using nextedy.checklist._TYPEID._FIELDID.mergeTemplateResolved. See Configuration Properties for details.
Saves checklist data back to a custom field on a Polarion object. You can pass either a Checklist object or raw string data.
Parameter
Type
Description
checklist
Checklist object
The checklist data to save
data
String
Raw checklist data as a string (alternative to Checklist object)
workItem
Work item object
The target work item
module
Document object
The target LiveDoc
field
String
The custom field ID to write to
Supported object types: work items, documents (LiveDocs).
The store method writes directly to the custom field. Make sure you call save() on the Polarion object afterward to persist the change to the repository.
Resets a checklist field back to its configured template state, discarding all user changes. This is the same operation that the ChecklistResetToTemplate workflow function performs.
Parameter
Type
Description
workItem
Work item object
The work item whose checklist to reset
module
Document object
The document whose checklist to reset
field
String
The custom field ID to reset
Supported object types: work items, documents (LiveDocs).
Applies the configured template to a checklist field. Unlike reset, this merges template items into the existing checklist rather than replacing it entirely.
Parameter
Type
Description
workItem
Work item object
The work item to apply the template to
module
Document object
The document to apply the template to
field
String
The custom field ID to apply the template to
Supported object types: work items, documents (LiveDocs).
Use reset when you want to discard all user changes and return to a clean template state. Use applyTemplate when you want to add missing template items into an existing checklist without removing user-added items.
Retrieves the resolved configuration for a specific checklist field on a Polarion object. The returned configuration reflects the full 4-level property hierarchy (global, type-specific, field-specific, type+field-specific).
Parameter
Type
Description
workItem
Work item object
The work item to resolve configuration for
module
Document object
The document to resolve configuration for
field
String
The custom field ID
Returns: The resolved checklist configuration object.
Returns the list of checklist field IDs that contribute to the summary field for a given Polarion object. Use this to determine which checklists are aggregated in summary reporting.
Returns a builder object for rendering checklist widgets in documents and work items. The builder supports interactive editing mode and PDF export mode.Returns: A document checklist view builder.
Merges a checklist item into the list. If an item with the same ID exists, it is updated; otherwise, the item is appended
uncheckAll()
void
Resets all items to the Empty result state
To count rejected (NOK) items, use getRejectedCount(). There are no built-in workflow conditions that gate on rejected item counts. You can implement custom workflow conditions using this method through the API. See the Workflow Functions and Conditions reference for the built-in conditions available.
The result state enum defines the possible states for each checklist item.
Value
Character
Label
Description
Empty
_
None
Item has not been evaluated
OK
X
Checked
Item has passed / is complete
NOK
O
Rejected
Item has failed / is rejected
The N/A and Pending result states are supported in the UI but the enum values shown above reflect the core code states. The full 5-state model (OK, NOK, N/A, Pending, Empty) may map to these base enum values with additional UI-level handling.
Specifies the custom field ID containing the checklist data. Required.
title(heading)
String
Adds a heading above the checklist widget
hideInPdf()
None
Hides the checklist in PDF exports
view(context)
Object
Sets the rendering context for PDF detection
render()
None
Generates the final HTML output. Call last.
The custom field specified in checklist() must be of type Text (multi-line plain text). Using any other field type causes a validation error with a message explaining the type mismatch.
The Checklist service is available as $checklistService in Velocity templates on wiki pages and live reports.Example: Display checklist items on a wiki page
Access the Checklist service through the Polarion platform service registry.Example: Uncheck all items in a workflow function
// Obtain the service from the platform registryIChecklistService checklistService = PlatformContext.getPlatform().lookupService(IChecklistService.class);// In a workflow function execute() method:String fieldId = arguments.getAsString("checklist");String[] fields = fieldId.split(",");for (int i = 0; i < fields.length; i++) { IWorkItem wi = context.getWorkItem(); Checklist chl = checklistService.parse(wi, fields[i]); chl.uncheckAll(); checklistService.store(chl, wi, fields[i]);}
From JavaScript / Nashorn (Scripted Conditions and Hooks)
Nashorn-based access to the Checklist service is supported. Use the platform registry service pattern to obtain the service instance in scripted workflow conditions and save hooks.
// Access the service via the platform registryvar checklistService = PlatformContext.getPlatform() .getRegistry().getService();
You can access the Checklist service from scripted workflow conditions, save hooks, and other Nashorn-based integration points in Polarion. The platform registry pattern is the standard way to obtain any Polarion extension service from script code.