Having issue with behavior script when Moving an issue

Trying to Move an issue Bug type from one Project to another gives an error message in the console.
Syntax error, unrecognized expression: [data-jbhv=" * Component/s: “]
I have a behavior script which checks for “Component/s” Field to be Single value for certain projects only for Bug Defect Type. I have no problems when Creating or Editing the Issue.
Here is the script:
FormField formComponent = getFieldById(getFieldChanged())
// if it’s a list it has more than one value
if (formComponent.getFormValue().getClass().toString().contains(‘List’)) {
def List compos = []
formComponent.getFormValue().each{obj->
try{
objint = obj as int
compos.add(objint)
}
catch(e){}
}
if (compos.size() > 1){
formComponent.with
{ setValid(false) String s = “Please select only one Component.” setTitle (s) setHelpText(”<div class=“warningBox”>$s") } }
}
else {
formComponent.with {
setValid(true)
setTitle ("")
setHelpText("")
}
}

1 Like