Skip to main content
diagram

Service Methods

The Checklist service exposes the following operations for working with checklists across all supported Polarion object types.

parse

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. 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.

store

Saves checklist data back to a custom field on a Polarion object. You can pass either a Checklist object or raw string data. 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.

reset

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. Supported object types: work items, documents (LiveDocs).

applyTemplate

Applies the configured template to a checklist field. Unlike reset, this merges template items into the existing checklist rather than replacing it entirely. 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.

getChecklistConf

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). Returns: The resolved checklist configuration object.

getChecklistsIdsForSummary

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: An array of custom field ID strings.

getDocumentChecklistView

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.

Checklist Object

The Checklist object represents a parsed checklist with all its items and provides methods for querying checklist state.

Constructor

Query Methods

Mutation Methods

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.

Checklist Item Object

Each checklist item represents a single entry in a checklist with its result state, label, and metadata.

Properties

Methods


Result State Enum

The result state enum defines the possible states for each checklist item.
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.

Enum Methods


Document Checklist View Builder

The document checklist view builder renders checklist widgets in LiveDocs and work items with support for interactive editing and PDF export.

Builder Methods

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.

Test Run and Plan Checklist View

A separate view builder handles test runs and plans with the same builder pattern.

Accessing the API

From Velocity (Wiki Pages and Live Reports)

The Checklist service is available as $checklistService in Velocity templates on wiki pages and live reports. Example: Display checklist items on a wiki page
Example: Display checklist summary counts

From Java (Workflow Functions and Conditions)

Access the Checklist service through the Polarion platform service registry. Example: Uncheck all items in a workflow function

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.
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.

Common API Patterns

Counting Rejected Items for Review Workflows

Rejected (NOK) item counts are not available through built-in workflow conditions. Use the API to implement custom counting logic:

Checking Mandatory Item Completion

Working with Multiple Checklists


Last modified on July 10, 2026