How to get the displayname of an assignee id

Manju March 23, 2023

Hi everybody, 

In a Jira automation rule, I am trying to retrieve the "display name" of an "assignee id", so I can use the display name in the issues description field. I already checked a few documentation on Jira, but either the functions are deprecated or it'is just not working:
e.g.
https://docs.atlassian.com/software/jira/docs/api/7.1.6/com/atlassian/jira/user/UserKeyService.html#getKeyForUsername-java.lang.String-


Does anyone have any advice/ideas on that topic?


1 answer

2 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 24, 2023

Hi @Manju and welcome to the community,

Use a smart value like {{issue.assignee.displayName}}

More on smart values can be found here https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/

Manju March 24, 2023

Hi @Alex Koxaras _Relational_ ,

thanks for the quick reply :) 
I did try out this option but my problem is, that the "issue of interest" isn't accessable in the moment of request. 

My use case is as follows:
I have a list of Jira user ids, which I use in a Jira automation rule to create issues for each of the users (with a for each action) based on an issue template I defined before (using the Deviniti Module):

The "More options" field in the "Create a new task"-Action is following:

pic_2.PNG

My issue template has the issue.key = JTR-57, the newly created issues are in a  Board starting with the key = AZE. 
To  be able to apply the method {{issue.assignee.displayName}} I need access to these newly created Issues. For some reason I can only access the Template issue (I checked with the logging, which issue keys are written to output). That's why I am looking for a convert-function or a getName-function to just convert the Jira user ids to its displayNames.


Manju April 17, 2023

Hi @Alex Koxaras _Relational_ ,

Do you have an idea how to solve this problem? 

best regards,
Manju

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events