ScriptedFields UserPicker always Anonymous

Roberto L
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.
March 7, 2019

Hi Community,

I am running into an issue with UserPicker scripted Fields.

I have the template be: UserPicker (Single User).

My code, attached below, grabs the value located in the "TISO" customfield which is in my issue object and it returns an ApplicationUser.

I have debugged and tested it and initially (before saving my ScriptedField) I was retrieving the correct ApplicationUser. Once I saved my ScriptedField and started running it in issues I kept on getting Anonymous even though the "TISO" field (which is a UserPicker) has a user inside of it. 

First screenshot displays how it shows anonymous user after saving my ScriptedField. Second screenshot displays how it shows the correct user before saving my ScriptedField.

First:

scriptedField User Picker.PNG

Second:

secondSriptedFieldImage.PNG

 

Very bizarre behavior. Can anyone provide some assistance in how to approach this?

Thank you!

-Roberto

1 answer

1 accepted

0 votes
Answer accepted
Roberto L
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.
March 7, 2019

Hello Community,

Answered my own question.

Turns out that once you create your scripted field you need to go to "Custom fields" in JIRA and edit the Scripted Field you created and set the Search Filter that shows in the edit of the custom field to whatever the template you created Scripted Field to be.

 

I changed it from "Multi Text" to "User Picker" and it worked :).

-Roberto

Suggest an answer

Log in or Sign up to answer