Hi.
Is it possible to reference an existing script field in another script field with the Script Runner plugin (v2.1.15)?
I've got a scripted field that calculates the response time in hours for an issue and now need another field to set a "Breached SLA" flag on the ticket. Ideally I'd like to be able to reference the Response Time in the new field so I can just say Response Time > 4, for example, rather than having to duplicate the Response Time logic in the second scripted field, but the following just produces "Server Error" when trying to preview the field on the Sctiped Field screen and nothing in the logs:
def responseTime = getCustomFieldValue("Time to Respond");
if (responseTime > 4) {
return "Yes";
} else {
return "No";
}
Am I doing something wrong, or do I have to duplicate the logic because you can't reference a Scripted Field from another Scripted Field?
Cheers,
Andrew.