Created
January 29, 2021 02:37
-
-
Save iaindooley/1195a8e284a37fd2627bd6ccf4fb3750 to your computer and use it in GitHub Desktop.
Change label with custom field
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 changeLabelWithCustomField(notification) | |
{ | |
var changed = new Notification(notification).changedCustomField(); | |
changed.card().labels().each(function(label) | |
{ | |
if(label.name() != changed.value()) | |
{ | |
changed.card().removeLabel(label); | |
} | |
}); | |
changed.card().addLabel(changed.value()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment