Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Insert value from another Field


i try to insert Value to UserPicker FIeld from another TextField. I try:

def onBehalf = customFieldManager.getCustomFieldObject(28311)
def requestParticipants = customFieldManager.getCustomFieldObject(18130)

def givenValue = issue.getCustomFieldValue(onBehalf) as String

def notNull = givenValue != null

issue.setCustomFieldValue(requestParticipants, givenValue)

I don't have any errors here, but it doesn;t work and in logs i have:

Time (on server): Thu Jun 11 2020 11:41:03 GMT+0300 (Moscow Standard Time)

The following log information was produced by this execution. Use statements"...") to record logging information.

2020-06-11 10:41:03,482 ERROR [workflow.AbstractScriptWorkflowFunction]: *************************************************************************************
2020-06-11 10:41:03,482 ERROR [workflow.AbstractScriptWorkflowFunction]: Script function failed on issue: null, actionId: 1, file: null
groovy.lang.MissingPropertyException: No such property: customFieldManager for class: Script194


1 answer

1 accepted

Hi @Andrei Lavrinovich 

I just want to make sure I understand correctly. You are trying to get the value of a TextField and inserting it into a UserPickerField? 

When and where are you trying to do this? 

I have solved it by myself. It's post function


import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder

def onBehalf = ComponentAccessor.customFieldManager.getCustomFieldObject(Field_ID)
def requestParticipants = ComponentAccessor.customFieldManager.getCustomFieldObject(Field_ID)

def givenValue = issue.getCustomFieldValue(onBehalf)

if(givenValue!= null){
def changeHolder = new DefaultIssueChangeHolder()
requestParticipants.updateValue(null, issue, new ModifiedValue(requestParticipants, givenValue),changeHolder)

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

83 views 1 6
Read article

Community Events

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

Events near you