Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created October 19, 2020 07:56
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/62fe141876d23d79469da792db96ce4b to your computer and use it in GitHub Desktop.
Save iaindooley/62fe141876d23d79469da792db96ce4b to your computer and use it in GitHub Desktop.
Move cards with label
var b = new Trellinator().board("My Board");//change the name here
var l1 = b.list("Target 1");//change the names of your lists
var l2 = b.list("Target 2");
b.list("My List").cards().each(function(card)//change the name of your list
{
try
{
card.label("Label 1");//move cards with Label 1 into list 1
card.moveTo(l1);
}
catch(e)
{
card.moveTo(l2);//else move cards without that label in to list 2
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment