updateChecklists
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())//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