Add or update items in a Checklist

It is possible to add or update checklist items in Automation using our REST API.

If you want to import a template, you should use our automation action for importing a template into a Checklist.


Steps

  1. Create an Edit Issue rule.

  2. The Checklist field type is not available in the list of fields. You must open More options and configure the values in Additional fields using our REST API.


Examples

The following examples are updating a checklist field named Checklist. You must use your own field name in place.

Adding items

AVAILABLE SINCE 5.2.0

Using the add update operation.

{ "update": { "Checklist": [ { "add": [ { "name": "Added item 1" }, { "name": "Added item 2" } ] } ] } }

Setting items (overwrites the checklist)

Using the set update operation.

{ "update": { "Checklist": [ { "set": [ { "name": "Develop" }, { "name": "Test" } ] } ] } }

Updating existing items

AVAILABLE SINCE 5.2.0

Using the edit update operation and looping over the existing items of the checklist.

This example checks all items in the checklist.

{ "update": { "Checklist": [ { "edit": [ {{#Checklist}} { "id": {{id}}, "checked": true } {{^last}},{{/}} {{/}} ] } ] } }

Conditionally updating existing items

AVAILABLE SINCE 5.2.0

Using the edit update operation and by looping conditionally over the existing items of the checklist.

This example sets the status N/A to every unchecked item of the checklist.


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