Set Incident 'Priority' based on 'Business Criticality' of a 'Service'

WazzaJC
Tera Expert

Set Incident Priority based on Business Criticality of a Service

 

Hi Guys, I'd really appreciate any help/guidance on an appropriate Script or Business Rule to use, to achieve the following:

My client has a requirement that the 'Priority' is auto-populated, based on the 'Business Criticality' that is associated to the 'Service' (cmdb_ci_service) that is selected by the User, all configured on the standard 'Incident' Form, on the 'Incident' Table.

 

Example, if the 'Business Criticality' associated with the 'Service' selected = '1 - most critical' then set the 'Priority' of the Incident to '1 - Critical'. etc

Example, if the 'Business Criticality' associated with the 'Service' selected = '3 - less critical' then set the 'Priority' of the Incident to '3 - moderate'. etc

 

How can I achieve this via Client Script or Business Rule and what would be an example of the Script or Business Rule details I need to achieve this please ?

 

Many thanks - any help greatly appreciated as always.

1 ACCEPTED SOLUTION

Sid_Takali
Kilo Patron
Kilo Patron

Hi @WazzaJC  try onChange client script 

function onChange(control, oldValue, newValue, isLoading) {
     var caller = g_form.getReference('ReferenceFieldName', doAlert); // doAlert is our callback function
}

function doAlert(service) { //reference is passed into callback as first arguments
   if (service.business_critically == '1')
     {
   g_form.setValue('priority','1');
}
else if (service.business_critically == '2')
     {
   g_form.setValue('priority','2');
}
else {
g_form.setValue('priority','3');
}
}

View solution in original post

5 REPLIES 5

Siddharam Takali,

 

Thanks very much - this is exactly the solution I needed, it is working perfectly on my client's instance.

 

I appreciate your help. Kind Regards.