Created
March 11, 2020 00:58
-
-
Save iaindooley/fe71f9c6bc0e8850138889a76adda7a9 to your computer and use it in GitHub Desktop.
Synch labels
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
function synchLabels(notification) | |
{ | |
var notif = new Notification(notification); | |
var added = notif.addedLabel(); | |
if(notif.member().notTrellinator()) | |
{ | |
new Trellinator().boards().each(function(board) | |
{ | |
try | |
{ | |
var first = board.cards().first(); | |
first.addLabel(added.name()); | |
first.removeLabel(first.label(added.name())); | |
} | |
catch(e) | |
{ | |
Notification.expectException(InvalidDataException,e); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment