Setting a Single select custom field value based on the Label field in ScriptRunner Behaviour

Vasanta Kumaar
Contributor
October 9, 2020

Hi,

 

I need to set a Dropdown field with a value Reset Application Account when we update the Label field with the Label Reset_password_AD_RPA.

I tried with below script in behavior but the dropdown field not getting updated.

def firstField = getFieldById("Labels")
def secondField = getFieldById("customfield_17350")

String firstFieldVal = firstField.getValue()

if (firstFieldVal.equals("Reset_password_AD_RPA")) {
secondField.setFormValue(21540)
} else {
secondField.setFormValue(null)
}

 

Can anyone help me on this.

 

Thanks,

Vasantakumaar

0 answers

Suggest an answer

Log in or Sign up to answer