Forums

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

How to display a user's display name in Post-function Comment?

Devany Cocco May 29, 2020

Hi, 

I have some automatic comments associated to my workflow to note to whom things were assigned.  I also have a post function on the transition to assign the Jira to the lead developer.  How can I have the lead developer's name show up in the comment?

When I use look up user, it inserts the account ID into the comment like this:

Assigned to lead developer (accountId:5d51bb36c6b9320d9ea5956a) for code review

Some articles explain this normally converts to the Display Name when you mention someone in a front end comment.  This is not converting when the post function is executed. 

I don't know a lot about the variables, but saw {{currentUser|userInfo("displayName")}} and tried to make it work like this (which is wrong):

Assigned to lead developer ({{accountId:5d51bb36c6b9320d9ea5956a|userInfo("displayName")}}) for code review

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 1, 2020

Hello @Devany Cocco

Thank you for reaching out.

Per your description, I understand you are trying to automatically add a comment when an issue is assigned, adding the comment with the name of the user that is assigned to the issue. Is that correct?

I'm not sure if it is possible to do with workflow post functions, but you can use the Jira automation feature to achieve this goal. These would be the steps:

  1. Navigate to your project > Project settings > Automation
  2. Add the following automation rule, using the parameter {{assignee.displayName}} to properly display the current assignee user:
    Screen Shot 2020-06-01 at 16.21.14.png

To know more smart values to add other fields, you can check the documentation below:

What are smart values? 

Let us know if you this works for you.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events