Hi,
I'm trying to develop a spel to set the impact of a incident based on a customized field (SREL nr).
For now I implemented the following spel:
cr::z_service_impact(...)
{
string method;
method = 'cr::z_service_impact';
string imp;
imp=z_affected_service.service_impact;
logf(SIGNIFICANT,"%s METHOD - Service Impact %s", method, imp);
if(!is_null(imp))
{
send_wait(0, this, "call_attr", "impact", "set_val", imp, "SURE_SET");
logf(SIGNIFICANT,"%s IMPACT", impact);
}
}
The .mod file
OBJECT cr {
TRIGGERS {
POST_VALIDATE z_service_impact() 2300
FILTER(EVENT("INSERT"));
};
};
When create a new ticket it does not change the priority automatically updated based on priority matrix.
Can anyone help on this? I've read that we can use calc_incident_priority() function in my spel, but I'm not getting there.