Using the smart key to get the last comment Last Comment :{{issue.comments.last.body}}
but when a user is tagged in the comment it extracts as user smart key ,i need the tagged user name
Hi @Emil Moses -- Welcome to the Atlassian Community!
That is not possible directly as the mention only contains the accountId value. You may confirm this by writing this value to the audit log in the rule to learn how mentions are implemented:
{{issue.comments.last.body}}
What problem are you trying to solve by doing this? Knowing that may help the community to offer suggestions.
Until then...One work-around is to call the REST API from the rule to get the user's information, including their user-name, email address, etc.
Kind regards,
Bill
Thanx for the reply @Bill Sheboy i actually created a para text field last comment to extract the last comment through Automation rule, when the rule is executed it copies the last commet from the comment section to last comment field but the tagged gives me only user id.. I wanted to extract last comment to excel when i extract now it shows hi - accound id (472947325gdjurir) instead of username
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I noted, you will need to call the REST API to do that...
Here is a now-to article on calling the REST API from a rule: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828
And the method you want to call is this one: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-get
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks tough and complex then i taught to get this done is there any other work around just somehow needed a name to be displayed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not aware of other solutions; a mentioned person is represented by their accountId and inside of Jira that is all the tool needs.
When you want to do more, you need to get the remaining user information the way Jira would: by calling the REST API function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.