Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Last active October 5, 2020 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/82e600603fa363ab41257f55818e47c4 to your computer and use it in GitHub Desktop.
Save iaindooley/82e600603fa363ab41257f55818e47c4 to your computer and use it in GitHub Desktop.
Copy cards rewrite
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