Updating checklists using SIL scripts

The Checklist custom field can be programmatically manipulated to extract and modify its data using the Simple Issue Language (SIL).

This requires that both the Checklist for Jira SIL Connector and the SIL Engine for Power Suite apps already be installed in your Jira instance.

Using checklists in SIL scripts

Checklist fields can be accessed in SIL scripts using their ID, name, or alias. For more information, see the Anova documentation.

Manipulating checklist items

Because Checklist yields an array of JSON values when queried, you can install the Checklist for Jira SIL connector. The connector adds a new structure to the SIL scripts named oChecklistItem. The structure makes it easier to manipulate checklist items in SIL scripts without having to worry about the back-end JSON format.

oChecklistItem structure

Field

Type

Description

Field

Type

Description

assigneeIds

String[]

A list of the usernames to which the item is assigned (only one assignee is currently supported).

Only useful if the User Assignment setting is enabled.

checked

Boolean

Whether the item is checked or not.

A disabled global item cannot be checked.

dueDate

String

The due date of the item as an ISO string.

Only useful if the Due Dates setting is enabled.

globalItemId

Number

The internal unique ID of the global item to which this item is linked.

When no ID is set, the item is considered to be a local item.

id

Number

The ID for the checklist item.

The ID is automatically created and does not need to be manually set. If you do set an ID, ensure that it is unique across the entire checklist.

isHeader

Boolean

Whether the item is a header or not.

Only useful if the Section Headings setting is enabled.

mandatory

Boolean

Whether the item is mandatory or not.

name

String

MANDATORY

The name of the checklist item.

Name changes in global items will not be saved.

priorityId

String

The numeric priority ID of the item as a string.

Only useful if the Priorities setting is enabled.

rank

Number

The rank of the item in the checklist, starting from 0. When the checklist is updated, the rank value is ignored, and the order in which the items are set in the array of checklist items is applied.

statusId

String

The status ID of the item.

Only useful if the Statuses setting is enabled.

Some values will be ignored until you activate the feature

All feature-related fields can be set, but will be ignored when the checklist is loaded in Jira until their related settings are enabled.

For instance, setting the priorityId field for all items will do nothing if the Priorities setting is disabled. Enabling the setting will show the priorities you set next time the checklist loads.


SERVER DOCUMENTATION (On Cloud? Go here.)
Have questions? Contact our Service Desk for help anytime.