I’m trying to add a behaviour that should make the field “Impediment reason” mandatory, when “Flagged” is selected.
I’m trying with this:
FormField flaggedField = getFieldByName(“Flagged”)
FormField reasonField = getFieldByName(“Impediment Reason”)
def flagged = flaggedField.getValue()
if(flagged.toString() == ‘1’)
But nothing seems to happen. I don’t get any errors, so I’m not even sure if I added it correctly. I went to behaviours, select “add new”, then I clicked on fields, and added an initialiser, where I put the above code. Then I mapped it to all projects and all issue types.
Please let me know what I’m doing wrong.