Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events