Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Last active May 21, 2021 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/7c7e319d9fc483de4a754809bed1dd0b to your computer and use it in GitHub Desktop.
Save iaindooley/7c7e319d9fc483de4a754809bed1dd0b to your computer and use it in GitHub Desktop.
updateAllChecklists
var notif = new Notification(notification);
var added = notif.addedChecklistItem();
if(!notif.member().notTrellinator())
throw new InvalidActionException("Ignore actions taken by the Bot user");
added
.checklist()
.card()
.board()
.cards()
.each(function(card)
{
if(card.id() != added.checklist().card().id())
{
try
{
card.checklist(added.checklist().name()).addUniqueItem(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