Forums

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

How to set "none" cascade select list to child

Juan José Marchal Gómez
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 Champions.
January 14, 2020

Hello,

 

when I use the following code to reset child option in cascade select list is not working.

Could you help me?

Best regards.

 

_________________________

I checked with:

def fieldConfig = customField.getRelevantConfig(issue)

def options = optionsManager.getOptions(fieldConfig)
def parentOption = options.find {it.value == parentValue}
def childOption = "none"

cfModule.setFormValue(parentOption.optionId, childOption )

 

And

def fieldConfig = customField.getRelevantConfig(issue)

def options = optionsManager.getOptions(fieldConfig)
def parentOption = options.find {it.value == parentValue}
def childOption = null

cfModule.setFormValue(parentOption.optionId,childOption )

 

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Alvin
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 Champions.
November 27, 2018

Hi @Bernd Anderer

you can use this

def field = getFieldById(getFieldChanged())

getFieldChanged() refers to the field Id that the server side script is attached to

Bernd Anderer
Contributor
December 21, 2018

Thanks - this was what I was looking for.

TAGS
AUG Leaders

Atlassian Community Events