You may need to extend an existing checklist with additional items. In those situations, you will start by retrieving the current list of Checklist Items.
Code Block | ||
---|---|---|
| ||
def ArrayList<ChecklistItem> existingChecklistValue = (ArrayList<ChecklistItem>) issue.getCustomFieldValue(checklistCustomField); |
...
Code Block | ||
---|---|---|
| ||
checklistCustomFieldType.updateValue(checklistCustomField, event.issue, newChecklistValue); |
...
Here Following is a complete example that can be used to add two items to an existing checklist:
...