Forums

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

User Picker Query

Andy King September 28, 2020

When using the Service Desk, I have used user picker custom fields as a way of selecting an individual within a request. This was mainly driven by the need to send automated email updates to the person selected. The issue I have is when using smart values in the automated email text instead of the name of the individual it pulls the unique ID of the user. I was curious if there was a formatting syntax similar to what is used in dates to pull the actual name rather than the unique ID? 

 

I have attached the screenshot of the automated email structure in the automation command as well as the result once it is executed. Capture1.PNG Capture.PNG

1 answer

1 accepted

0 votes
Answer accepted
Niranjan
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.
September 28, 2020 edited

@Andy King ,

Can you try issue.get("customfield_15245")?.displayName 

Andy King September 28, 2020

Thanks for the suggestion, I used the format and it kicked out an error, see screenshot. Capture.PNG

Niranjan
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.
September 28, 2020

issue.get("customfield_15245") - Is this working?

Andy King September 28, 2020

Sorry can you confirm firstly I have the right structure? I am using it like this - 

{{issue.get("customfield_15245")?.displayName}}

 

You are suggesting I replace it to show this instead -

{{issue.get("customfield_15245")}}

 

Correct?

Niranjan
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.
September 28, 2020

Yes. Actually this issue.get("customfield_15245")?.displayName works for certain groovy scripts. If that doesn't work , you can try {issue.get("customfield_15245")}

Andy King September 28, 2020

it works thanks 

Mahesh Kallepalli December 15, 2020

@Andy King @Niranjan ,

 

I have tried {issue.get("customfield_11700")} in automation but in email it is not displaying user name returning same value.

Please find the below screenshot for reference needs to display a user name instead of an email id.

 

Reporting manager.JPG

Like • DE GIORGI STEFANO likes this

Suggest an answer

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

Atlassian Community Events