Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to evaluate if an issue has links inside an email automation

Tom Scoggin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2025

I've been trying to evaluate if the current ticket has any values in the issue.issuelinks field and just can't seem to get it to evaluate to True. I've tried:

  • {{(#if (issue.issuelinks))}}
  • {{(#if (issue.issuelinks.isNotEmpty()))}}
  • {{#if (issue.issuelinks.outwardIssue.value.isNotEmpty())}}

If I add {{issue.issuelinks.outwardIssue.key}} directly into my email template it prints the two linked issues keys. As a work around I put the {{issue.issuelinks.outwardIssue.key}} value in a variable and then evaluated to see if that variable was empty and it works. I was just hoping to have a more direct way.

Thanks for the assistance.

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2025 edited

Hi @Tom Scoggin 

Checking for empty (or blank) fields within rules is challenging and depends upon both the field type...and for some fields whether or not they ever had a value (and were later cleared).

For a list field such as {{issue.issuelinks}} please try using the size function with a condition on the math function gt() for greater than 0:

{{#if(issue.issuelinks.size.gt(0))}}there are links!{{/}}

 

Kind regards,
Bill

Tom Scoggin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2025

Thanks Bill. I was able to use it for Labels and Components as well. 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events