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.
Create an Edit Issue rule.
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.
The following examples are updating a checklist field named Checklist. You must use your own field name in place.
Using the add update operation.
{ "update": { "Checklist": [ { "add": [ { "name": "Added item 1" }, { "name": "Added item 2" } ] } ] } } |
Using the set update operation.
{ "update": { "Checklist": [ { "set": [ { "name": "Develop" }, { "name": "Test" } ] } ] } } |
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}},{{/}} {{/}} ] } ] } } |
Using the edit update operation and by looping conditionally over the existing items of the checklist.
This example sets the status to every unchecked item of the checklist.
{ "update": { "Checklist": [ { "edit": [ {{#Checklist}} { "id": {{id}} {{#if(not(checked))}}, "status": { "id": "notApplicable" } {{/}} } {{^last}},{{/}} {{/}} ] } ] } } |