I am trying to set up an after read calculation, the calculation Syntax seems OK but the attribute is not populating with data if I have a dependency set, if I don't set up a dependency the attribute doesn't update when the incident updates.
The calculation attribute is in relation tothe Escalation Point object, I have tried setting it up on the Escalation Point & Incident objects and neither seem to work as required.
The calculation is below. I will explain what I am trying to achieve after and maybe you can see where I am going wrong?
import System
static def GetAttributeValue(EscalationPoint):
Value1 = 'PASS'
Value2 = 'FAIL'
Value3 = 'OPEN'
Value4 = 'NON KPI METRIC'
if EscalationPoint.Title == 'Email & Self Service' and EscalationPoint.Status == 'Completed': return Value1
if EscalationPoint.Title == 'Email & Self Service' and EscalationPoint.Status == 'Cancelled': return Value1
if EscalationPoint.Title == 'Email & Self Service' and EscalationPoint.Status== 'Expired': return Value2
if EscalationPoint.Title == 'Email & Self Service' and EscalationPoint.Status == 'Open': return Value3
if EscalationPoint.Title != 'Email & Self Service': return Value4
Basically, the calculation is to analyse whether incidents that are logged by auto email or self service are responded to within a 30 minute SLA. The reason I can't just look at the Status is that when an incident is logged by mail or self service the response level is set at the 30 minute response by the template, which is over written by the SLA Matrix once it has been responded to (the category, urgency & impact set the SLA). The only exception to this is Quarantined Mail Release requests, which stay on the 30 minute response level.
The calculation logic above is correcr, I just can't see why it isn't populating as expected...