my jira version is 4.4.1,behaviours plugin version is 0.5.0
1. there are two fields:'ToolType' and 'Description'.
'ToolType' is of Cascading Select type , and it has set its first default value as Camera,the second default value is not set.
'Description' is of Text Field type.
2. i want to make 'Description' required when 'ToolType' select value Camera
i wrote the following code
FormField tl = getFieldById("customfield_11500")
FormField des = getFieldById("customfield_11501")
if (tl.getValue().contains('Camera')){
des.setRequired(true)
}else{
des.setRequired(false)
}
problem one:
on create screen,'Description' is not required,although 'ToolType' has default value Camera.
problem two:
when choose LCD as 'ToolType' value, 'Description' is not required. click 'Description' text box, it is still not required as expected.
while once i have choosed Camera as 'ToolType',of course 'Description' is shown required.
then i choose LCD,'Descrption' is shown unrequired as expected.but when i click the 'Description' text box.it is shown required !!! and later 'Description' will display required as long as it is clicked ,no matter what 'ToolType' is chosen.