/
Updating items in checklists using SIL
Updating items in checklists using SIL
A common use case involves updating the properties of existing checklist items.
Steps
Retrieve the current list of items from the custom field converted from JSON to the
oChecklistItem
structure.oChecklistItem[] items = fromJson(DoD);
Loop over the collection and apply the desired changes. For example, you could remove the status of a specific item.
for(oChecklistItem item in items) { if (item.name == "Code reviewed") { item.statusId = "none"; } }
Update the custom field by passing it the same collection that was initially extracted from the custom field converted to JSON.
DoD = toJson(items);
Example
Here is a full example that can be used to modify a checklist to:
Uncheck all items;
Clear items with the “In Progress” status;
Make the “
Code reviewed
” item optional.
In this example, the checklist field’s name is DoD
.
SERVER DOCUMENTATION (On Cloud? Go here.)
Have questions? Contact our Service Desk for help anytime.
, multiple selections available,
Related content
Updating checklists with new sets of items using SIL
Updating checklists with new sets of items using SIL
Read with this
Configuring checklists using REST APIs
Configuring checklists using REST APIs
Read with this
Updating checklists using Jira's REST API
Updating checklists using Jira's REST API
Read with this
Checklist item representations
Checklist item representations
Read with this
Updating items in checklists using ScriptRunner
Updating items in checklists using ScriptRunner
Read with this
Action - Import template
Action - Import template
Read with this