Last active
May 21, 2021 23:58
-
-
Save iaindooley/7c7e319d9fc483de4a754809bed1dd0b to your computer and use it in GitHub Desktop.
updateAllChecklists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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