Hi All
I am trying to implement that on the selection of a particular component that another custom field becomes required. I am trying to do this in the behaviours plugin
Behaviour plugin Version: 0.5.10
JIRA Version 6.0.4 Build Number 6100
I have placed the following in the serverside script box and turned logging on.. however nothing seems to be happeneing when I enter or edit a new bug where Cameras is selected as a component and the Camera field is left empty... I was expecting an error. Any suggestions as to whats missing?
I turned logging on but dont see anything in th log window when I use F12 on the browser.
FormField componentField = getFieldByName("Component/s")
FormField cameraField = getFieldByName("Camera")
if (componentField.getFormValue() == "Cameras")
{
cameraField.setHelpText("<div class=\"warningBox\">As this is a cameras issue you must detail the camera you are using on the 'System' tab.</div>")
cameraField.setRequired(true)
}
else {
cameraField.setRequired(false)
}
Cheers
Nick