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}}
{{/}}
@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.
Well done!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.