Last active
May 26, 2021 00:07
-
-
Save iaindooley/2ffce3d3089ec6580ad011181314e616 to your computer and use it in GitHub Desktop.
copyCommonCards
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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