Our project in JSM is a Technology Help Desk. I am trying to set up a validator using Script Runner to ensure that 2 of the request types (custom field) are unable to be transitioned to Closed unless the Affected CIs (Assets object custom field) is filled in. These two request types (Add/Change Software and Add/Move/Change/Replace a Hardware Device) are the only service request types that have the Affected CIs field on the form. So basically: If its Request Type A or Request Type B, then Affected CIs cannot be null. Here is what I have tried:
issue.customfield_13994 != null && (issue.customfield_13814.name == “Add/Change Software” || issue.customfield_13814.name == “Add/Move/Change/Replace a Hardware Device”)
The custom field ID for Request Type is 13814
The custom field ID for Affected CIs is 13994
I wasn’t able to get any answers from Atlassian support or Adaptavist (ScriptRunner) support so any help is greatly appreciated!