My Jira version is 5.2.6 and Behaviours plugin is version0.5.3
I have a custom field that is called Production Cut-in that has a select list of Yes or No. If the user selects Yes I need to have another custom field called ECP marked as required, if the user selects no than the ECP field should not be required. I am new to groovy scripting and am not sure if I wrote the script correctly. Here is what I came up with:
FormField pro = getFieldById("customfield_11505")
FormField ecp = getFieldById("customfield_11506")
if(pro.getValue().contains('Yes')){
ecp.setRequired(true)
}else{
ecp.setRequired(false)
}
Any help would be greatly appreciated.
Thanks.