Last active
February 25, 2020 23:53
-
-
Save iaindooley/77fa9c7bcbdd1ac09bb6adf3d41b4c07 to your computer and use it in GitHub Desktop.
Copy board with assignees
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 copyBoardWithAssignees(notification) | |
{ | |
var moved = new Notification(notification).movedCard(/Copy Template.*/i); | |
var copied = new Trellinator() | |
.board("My Template") | |
.copy(moved.name()); | |
copied.cards() | |
.each(function(card) | |
{ | |
card.labels().each(function(label) | |
{ | |
try | |
{ | |
card.addMember(copied.member(label.name())); | |
card.removeLabel(label); | |
} | |
catch(e) | |
{ | |
Notification.expectException(InvalidDataException,e); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment