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: 

Question on using list.isEmpty with list.get(index)

Jess Burden
May 5, 2021

Hi, 

I have the following rule on a service desk project: 

When someone escalates an issue, create a linked issue and summarise trigger issue's comment history into comments on new issue. 

I reference this help article: https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/ 

I summarise comments using the following:

*{{triggerissue.comment.get(10).author.displayName}}*
{quote}
{{triggerissue.comments.get(10).body}}
{quote}

This retrieves the 10th comment from the trigger comment. 

However, I was hoping to add a clause that if it's empty it would not print anything. 

{{#if(not(triggerissue.comment.body.isEmpty))}}
**
{{/}}

The above works well but I can't do the same with specific comments? eg. below

{{#if(not(triggerissue.comment.get(10).body.isEmpty))}}
**
{{/}}

I would like to use the IF function to prevent non-existent comments from printing but I would like to be able to pull and format specific comments from trigger issue. 

Is there an alternative? Any pointers or advice is greatly appreciated. 

Many thanks, 

Jess 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events