Forums

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

Wanted to extract the last comment

Emil Moses November 19, 2022

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.jpgScreenshot 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