Last active
July 1, 2019 01:14
-
-
Save markdon/b20db719b2755bab94efd332b476484f to your computer and use it in GitHub Desktop.
Boards WebSphere Create Lots of Cards
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
// THESE ARE TWO DIFFERENT FUNCTIONS | |
// Add cards to every list | |
(function(){ | |
const cardsPerList = 200; | |
Boards.current.boardNode.attributes.childNodes.models.forEach(list=>{ | |
for(let i = 0; i <= cardsPerList; i++ ) | |
list.createTaskChild(`Card ${i}`); | |
}); | |
})() | |
// add cards to every node that has the name "Parent" | |
Boards.current.boardNode.getAllDescendants().filter(node=> node.attributes.name === "Parent").forEach(parent=>{ | |
const cardsPerList = 399; | |
for(let i = 0; i <= cardsPerList; i++ ) | |
parent.createTaskChild(`Card ${i}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment