I have created the below ScriptRunner behaviour, which is functioning, but is also giving an inline error "cannot find matching method getAt(int)". This inline error is filling up the server error logs and cannot be the long term solution. Any input would be greatly appreciated, as at this time I have 3 additional behaviours to create, that are based off of the same input fields.
- Business Area Reporter is a custom field list box
- System Selection is a cascaded list box, with the first list being a department name, and the second list being a selection of system for each specific department.
def fieldToRequire = getFieldByName("Business Area Reporter")
def system = getFieldByName("System Selection").getValue()
if (system[0] == 'Department Name Here') {
fieldToRequire.setRequired(true) //require field
} else {
fieldToRequire.setRequired(false) //do not require
}