Forums

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

Smart values when using #issues and #comments, as well as conditional logic.

Kim Barry August 29, 2023

I have saved in comments when a field was updated, who updated it, the previous value, and the new value. I also have added a label when it happens. Now I want to pull the information from the comments. I have been able to query for the issues and add to an email the Issue key, summary, and description. Now I need to add the comment if the author display name is Jira Admin/username is jiraadmin. I am struggling how to format this. This is the beginning of it, but I don't know where to go from here. Help?

{{#issues}}
<p>{{key}} {{summary}}
{{url}}
Description: {{description}}

{{/}}

2 answers

1 accepted

0 votes
Answer accepted
Kim Barry August 29, 2023

@Bill Sheboy Thank you! I had looked at that documentation before and was still struggling however, I review again and figured it out!

{{#issues}}
<p>{{key}} {{summary}}
{{url}}
Description: {{description}}
{{#comments}}
{{#if(equals(author.displayName, "Jira Admin"))}}
{{last.body}}
{{/}}{{/}}{{/}}
</p>

I really only wanted the last comment the user made. 

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.
August 29, 2023

Well done!

0 votes
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.
August 29, 2023

Hi @Kim Barry 

First thing, I am using Jira Cloud and not Server/Data Center and so my suggestion is based on general knowledge of automation rules.

For the comment information, I believe you can use {{issues.comments.last.author.displayName}}

https://confluence.atlassian.com/automation/smart-values-993924860.html

If you are trying to select specific comments from all of them, perhaps try filtering them using smart value, list filtering: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588

Kind regards,
Bill

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