Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created January 29, 2021 02:37
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/1195a8e284a37fd2627bd6ccf4fb3750 to your computer and use it in GitHub Desktop.
Save iaindooley/1195a8e284a37fd2627bd6ccf4fb3750 to your computer and use it in GitHub Desktop.
Change label with custom field
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