Display Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 01:21 AM
Hello All,
Hello All,
Kindly help me with the below requirement,
If User is securonix admin.
impact=1
urgency =1
Priority = High
If impact =2
urgency = 2
Priority = Low
I have written a display business rule for it, but it does not work:
Please help me with the script as it doesnot work .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 02:28 AM
ok if caller has securonix admin. role you want to update the Priority to 1 right?
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 02:35 AM
Hi Shyam,
The requirement is :
If User is securonix admin, then the below following field should work :
impact=1
urgency =1
Priority = High
If impact =2
urgency = 2
Priority = medium
impact =3
urgency = 3
Priority = low
Please help me with the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 02:37 AM
@ShiningStar1 , how can you put multiple Priorities if role matches , I hope you want to Set Priority to 1 , can you get the Clarity on the Requirement
Regards,
Shyamkumar
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 01:40 AM
Hi James,
Here is my client script :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 03:11 AM - edited 02-14-2024 03:11 AM
Hi @ShiningStar1, if the requirement is to check the role for logged in user then you can try the below script.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var impact = g_form.getValue('impact');
var urgency = g_form.getValue('urgency');
if (g_user.hasRole('securonix_admin')) {
if (impact == 1 && urgency == 1) { //Assuming 1 as High
g_form.setValue('priority', 1);
} else if (impact == 2 && urgency == 2) {
g_form.setValue('priority', 2); //Assuming 2 as Medium
} else if (impact == 3 && urgency == 3) {
g_form.setValue('priority', 3); // Assuming 3 as Low
}
}
}
Regards,
Sunil