Last active
October 5, 2020 06:32
-
-
Save iaindooley/82e600603fa363ab41257f55818e47c4 to your computer and use it in GitHub Desktop.
Copy cards rewrite
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 copyOnComment(notification) | |
{ | |
var notif = new Notification(notification); | |
var A = new Trellinator().board("Board A").findOrCreateList("A"); | |
var B = new Trellinator().board("Board B").findOrCreateList("B"); | |
var x = 0; | |
if(notif.member().notTrellinator()) | |
{ | |
notif.board().list("A").cards().each(function(card) | |
{ | |
x = x+1; | |
card.copyToList(B,1); | |
if(x>1) | |
throw new InvalidActionException("We only want two cards"); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment