- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 04:43 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 05:09 AM
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');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 09:38 AM
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.