Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Last active September 15, 2020 23:49
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/fbbb456b68469429d42ca5cbee5ffcd1 to your computer and use it in GitHub Desktop.
Save iaindooley/fbbb456b68469429d42ca5cbee5ffcd1 to your computer and use it in GitHub Desktop.
Bulk remove and re-assign
var remove_member = "iaindooley";//put your username to remove here
var reassign_to = "trellinatorhcasydeast";//the person who will take on their tasks
var board_name = "some test";//where this will happen
////////////////////////////////////////////////
var to_reassign = new Member({username: reassign_to});
var board = new Trellinator().board(board_name);
board.cards().each(function(card)
{
try
{
var to_remove = card.member(remove_member);
card.removeMember(to_remove).addMember(to_reassign);
}
catch(e)
{
Notification.expectException(InvalidDataException,e);
}
});
board.removeMember(new Member({username: remove_member}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment