Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created February 3, 2021 00:35
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/27b49e836a2bf4fa5a31e403fbdb050a to your computer and use it in GitHub Desktop.
Save iaindooley/27b49e836a2bf4fa5a31e403fbdb050a to your computer and use it in GitHub Desktop.
Link issue to asset card
function linkIssueToAssetCard(notification)
{
var created = new Notification(notification).createdCard();
if(parts = /.+\b([A-Z0-9]+)-([A-Z0-9]+)-([A-Z0-9]+)\b.+/.exec(created.name()))
{
created.attachLink(
new Trellinator()
.board("Assets")
.card(new RegExp(".+"+RegExp.escape(parts[1])+".+")
.link()
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment