Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created August 28, 2019 19:17
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/6a82562d486e447307df4911b7bcf76a to your computer and use it in GitHub Desktop.
Save iaindooley/6a82562d486e447307df4911b7bcf76a to your computer and use it in GitHub Desktop.
Move cards with label
function moveCardsWithLabel()
{
var b = new Trellinator().board("My Board");
var l1 = b.list("Target 1");
var l2 = b.list("Target 2");
b.list("My List").cards().each(function(card)
{
try
{
card.label("Label 1");
card.moveTo(l1);
}
catch(e)
{
card.moveTo(l2);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment