Forums

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

[Behavior] Set Current User to Single User Picker Custom Field on Customer Portal

Abdulkarim Itani October 20, 2019

I tried the following code and the form is not updating

 

The behavior is mapped to the correct project (Jira Service Desk)

 

import com.atlassian.jira.component.ComponentAccessor
def affectedUser = getFieldByName("<You custom field name here>")

def currentuser = ComponentAccessor.jiraAuthenticationContext.loggedInUser.username

affectedUser.setFormValue(currentuser)
affectedUser.setHelpText(currentuser)

This code is updating the help text but not updating the form value.  

Am I doing anything wrong?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events