Hi all,
Just starting to explore ScriptRunner.
I got a radio button custom field "Resoved on first call" (id=10219) with default value of "No". And another custom field "Resolution comment" (id=10215).
I want to hide the Resolution comment field if the Resolved on first call is = "No".
My script looks like this....
const reso_1call = getFieldById("customfield_10219");
const reso_comment = getFieldById("customfield_10215");
logger.info('Value : '+ reso_1call.getValue().name);
if(reso_1call.getValue().name == 'Yes'){
reso_comment.setVisible(true);
logger.info('true');
} else {
reso_comment.setVisible(false);
logger.info('false')
}
The script has red undeline on customfield_10219 and .name.
If I hover my mouse on customfield_10219, the message is... "Argument of type '"customfield_10219"' is not assignable to parameter of..."
And hover on .name, the message is... "Property 'name' does not exist on type 'string..."
What am I doing wrong? Please help.