Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created October 9, 2019 03:20
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/03035b030c17424001db0a591f4a1bef to your computer and use it in GitHub Desktop.
Save iaindooley/03035b030c17424001db0a591f4a1bef to your computer and use it in GitHub Desktop.
Add Checklist Templates
function addChecklistTemplates(notification)
{
var created = new Notification(notification);
Board
.findOrCreate("Checklist Templates")
.list("Global")
.cards()
.each(function(card)
{
card.checklists().each(function(cl)
{
card.copyUniqueChecklist(cl.name(),created,"top");
});
});
}
function retroactivelyAddChecklists()
{
var global = Board
.findOrCreate("Checklist Templates")
.list("Global")
.cards();
new Trellinator()
.boards()
.each(function(board)
{
board
.cards()
.each(function(card)
{
global.each(function(loop)
{
loop.checklists().each(function(cl)
{
loop.copyUniqueChecklist(cl.name(),card,"top");
});
});
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment