Hi ,
I am running a Script Job to send a report ever day at 7am with assignee but i am getting the username in the field but I want the report to show the User Display name. what should I do to get the Display Name and not the username.
Regards,
Sunil
Hi @G Sunil Kumar,
you can give a try of below code to get display name of the assignee
def assigneeName = issue.fields.assignee?.displayName
BR,
Leo
Hi @Leo ,
I am getting an error as it doesn't recognize issue.fields
I have setup a HTML code in Script Jobs to form a table in which one of the table is Assignee Field where I am getting the result username instead of Display Name.
Below I have attached the script I have used.
inputIssues.each { issueObj ->tr {td {a(href: "$baseUrl/browse/$issueObj", "${issueObj.key}")}td(ChangeEnd ? (issueObj.getCustomFieldValue(ChangeEnd).toString()) : "Invalid field1")td(issueObj.status.getName().toString())td(issueObj.assignee.toString())td(issueObj.summary.toString())td(issueObj.description.toString())}}
I haven't used cloud version so far, but just my assumption.
something like below
issueObj.assignee?.displayName.toString()
HI @Leo ,
Thanks for the solution. I script is working after the change.
It looks like you're new here. Sign in or register to get started.