Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Last active May 26, 2021 00:07
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/2ffce3d3089ec6580ad011181314e616 to your computer and use it in GitHub Desktop.
Save iaindooley/2ffce3d3089ec6580ad011181314e616 to your computer and use it in GitHub Desktop.
copyCommonCards
var added = new Notification(notification).addedLabel(/Common/i);
added.card().removeLabel(added.name());//REMOVE THE LABEL: STOP IT FROM RECURSIVELY COPYING
new Trellinator().boards().each(function(board()
{
if(board.id() != added.card().board().id())
{
try
{
added
.card()
.copyToList(board.lists().first(),"top")
//.attachLink(added.card().link())//OPTIONAL: Link the cards back to the source?
;
}
catch(e)
{
//Don't halt if you run into a board with no lists
Notification.expectException(InvalidDataException,e);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment