Skip to content

Instantly share code, notes, and snippets.

@markdon
Last active July 1, 2019 01:14
Show Gist options
  • Save markdon/b20db719b2755bab94efd332b476484f to your computer and use it in GitHub Desktop.
Save markdon/b20db719b2755bab94efd332b476484f to your computer and use it in GitHub Desktop.
Boards WebSphere Create Lots of Cards
// 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