Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To assign a new set of items, you must create a new ArrayList<ChecklistItem>:

Code Block
languagejava
// Create a new Checklist
def ArrayList<ChecklistItem> newChecklistValue = new ArrayList<ChecklistItem>();
def item = checklistCustomFieldType.getSingularObjectFromString('{"name": "item name"}');
newChecklistValue.add(item);

// Update the issue with the new checklist
checklistCustomFieldType.updateValue(checklistCustomField, event.issue, newChecklistValue);

...