Hi there,I have a question regarding automation.Is it possible to extract last comment author in JIRA Automation. I am using JIRA server.I tried with - commentLastCreatedBy & {{issue.comments.last.author.displayName}}
But no luckThank you
Hi @Harsh ,
I've managed to trigger an automation rule that comments using the last comment author name using {{issue.comments.last.author.displayName}}
Additionally maybe you might find the article bellow useful.
https://confluence.atlassian.com/automation074/smart-values-1141481319.html
Thanks,
Mihai Schwarz
Hi @Mihai Schwarz I used the same thing , but I want to compare if the last comment author is assignee, which is not working as expectedThank you
@Harsh make sure that you are getting the usernames as the format for the first argument is simply a text and the assignee is a username (most probably email format).
If you can share more information I can try an replicate your case to see if I can help you with a solution.
Hi @Mihai Schwarz
Thanks for the information.
I actually modified the one which you sent to compare(advanced compare)it to the custom field user field which act as second reporter
i.e {{issue.comments.last.author}} = {{issue.customfield_123.displayName}}
And edited the issue as per the requirement via automation.
Hence your information helped me.
I'll accept the answer.
Thanks
Hi @Harsh
I do not believe displayName values are required to be unique for users in a Jira site.
Instead you may want to compare the accountId values; those will be unique.
Kind regards,Bill
Hello,
For Jira Server Automation, the correct way to reference the last comment's author depends slightly on your Automation version, but here are the most reliable methods:
In Jira Automation's smart values, the comments array is sorted with the newest comment first. Therefore, index `0` refers to the most recent (last) comment.
You can use this value to:
Use the "Send webhook" action with a dummy URL or the "Log action" action (if available in your version) to output `{{lastComment.author}}` or `{{issue.comments.0.author}}` and see the raw value in your audit log. This helps confirm you're getting the expected user object.
Give `{{lastComment.author.displayName}}` a try first. If that variable is empty, fall back to `{{issue.comments.0.author.displayName}}`.
Hope this helps!
Sarah
Hello @Harsh I'm Bartek, from Orbiscend OU - ARGON app provider.If you will switch to Jira Cloud in the future, you can try our app ARGON Our commented function allows you to search for issues that have comments matching specific criteria, such as content, author, or time period.issue in commented("project = SER", "John Smith", "2023/01/01", "2023/12/31")ARGON Powerful JQL Search
commented
Hope in the future you have chance to check our solution.
GreetingsBartek
It looks like you're new here. Sign in or register to get started.