Forums

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

Wanted to extract the last comment

Emil Moses November 19, 2022 edited

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 nameScreenshot 2022-11-06 225706.jpg Screenshot 2022-11-06 225058.jpg

1 answer

1 vote
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.
November 19, 2022

Hi @Emil Moses 

What are you trying to do with the displayName value?  Knowing that may help the community to offer more specific suggestions.

Until we know that...

The way mentions are implemented, the comment only contains the accountId value, and no other user information.

There are a couple of work-arounds for this for an automation rule:

  • call the REST API, get user function with a webrequest, passing in the accountId, and that will provide all the user information
  • add a custom field to your issue just for this purpose
    • work with your site admin to add the field
    • in your rule, set the custom field to the accountId from the mention
    • re-fetch the issue so it reloads
    • and now you may access the displayName from the custom field

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

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 now
AUG Leaders

Atlassian Community Events