Created
October 9, 2019 03:20
-
-
Save iaindooley/03035b030c17424001db0a591f4a1bef to your computer and use it in GitHub Desktop.
Add Checklist Templates
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
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