Created
January 15, 2019 01:09
-
-
Save iaindooley/94d09fc83c459fab3c8dc894de258758 to your computer and use it in GitHub Desktop.
Copy board
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 newBoardFromTemplate(notification) | |
{ | |
//When a card is added to the Project Kickoff list | |
var trigger_card = new Notification().addedCard(/Project Kickoff/); | |
//Find the template board | |
var template_board = Board.findOrCreate("Project Template"); | |
//Copy this to a new board named after the created card in the "Work" team | |
var new_board = template_board.copy(trigger_card.name(),new Trellinator().team("Work")); | |
//Attach a link to the created board back to the trigger card | |
trigger_card.attachLink(new_board.link()); | |
//Assign people to cards in the created board based on the template | |
new_board.cards().each(function(card) | |
{ | |
template_board.card(card.name()).members().each(function(member) | |
{ | |
card.addMember(member); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment