Jira Cloud ScriptRunner - Display name for user

Pavel Antonenko February 21, 2017

Hi all,

We are using JIRA Cloud and Script Runner. How I can extract display name of assignee of task in post-function? I need to put it to task summary later.


Thank you in advance for the answers!

1 answer

5 votes
Jon Bevan [Adaptavist]
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.
February 21, 2017

Hi Pavel,

The display name of the assignee should be available like this:

def assigneeName = issue.fields.assignee?.displayName

The question mark is there in case assignee is not set yet, in which case the code will not throw an error, but assigneeName will be null.

Suggest an answer

Log in or Sign up to answer