Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created October 23, 2020 06:16
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/7fad62c325d6fd8782432f2b7cb63ea6 to your computer and use it in GitHub Desktop.
Save iaindooley/7fad62c325d6fd8782432f2b7cb63ea6 to your computer and use it in GitHub Desktop.
Populate next list
function populateNextList(notification)
{
//When a checklist is completed
var comp = new Notification(notification).completedChecklist();
var alldone = true;
//If all other checklists on all cards in the same list are also complete
comp.card().currentList().cards().each(function(card)
{
alldone = card.allChecklistsComplete();
});
if(alldone)
{
//Find the next list in the templates board and copy it to the bottom position of the trigger card's board
new Trellinator().board("My Checklist Templates")//replace with the name of your actual template board
.lists().itemAfter(comp.card().currentList().name())
.copy().move(comp.card().board(),"bottom");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment