Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Last active October 9, 2021 02:00
Show Gist options
  • Save iaindooley/3a99a495e31bffbeb847ded9190da4d6 to your computer and use it in GitHub Desktop.
Save iaindooley/3a99a495e31bffbeb847ded9190da4d6 to your computer and use it in GitHub Desktop.
updateChecklists
var notif = new Notification(notification);
var added = notif.addedChecklistItem();
if(!notif.member().notTrellinator())//don't react if the bot added the item
throw new InvalidActionException("Don't loop!");
var added_to = added.checklist();
var source_card = added_to.card();
card.board().cards().each(function(card)
{
if(card.id() != source_card.id())
{
try
{
card.checklist(added_to.name()).addItem(added.name());
}
catch(e)
{
Notification.expectException(InvalidDataException,e);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment