The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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 Champions.
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
January 13, 2025

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 Champions.
January 13, 2025

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

Like • Bill Sheboy likes this