Hi Community, Is it possible to set default value in user picker custom field by the current user in customer portal? using behavior ?
I need to capture the current user on" Requested for " user picker custom field like on the above "Raise this request on behalf of" system field.
I tried it using this behavior , place it on Initialiser, mapped to Service Desk Project, because I just want it to become a default value. but no luck, any chances? When I try to check the console in chrome (f12)
When user is admin account, it can capture the user and place on the field, but when the user is customer account, it returns this error
This is the code:
def requestorField = getFieldById("customfield_10385")
def currentUserName = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser().getName()
def superior = getFieldById("customfield_10600")
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser().getName()
I found above code and it populates jira login id. it works. However, I am looing to have default value as "last name, First name"
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events