Skip to content

Instantly share code, notes, and snippets.

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/1102d83ab01c9a8c333066f04ae8a635 to your computer and use it in GitHub Desktop.
Save iaindooley/1102d83ab01c9a8c333066f04ae8a635 to your computer and use it in GitHub Desktop.
Mark parent card complete when child cards under given list
function markParentCardCompleteWhenChildCardsUnderGivenList(notification)
{
var complete = true;
var parent = new Notification(notification)
.movedCard("Completed List")
.cardsLinkedInAttachments()
.first();
parent.cardsLinkedInAttachments().each(function(card)
{
if(card.currentList().name() != "Completed List")
complete = false;
});
if(complete)
parent.markDueDateComplete();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment