when incident priority is p5 , problem priority is also same ,but need to change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 02:00 AM
Hi Team,
i have incident priority are: 1 to 5.
problem priority are :1 to 4.
when i cretaed the incident with priority p5, and i created the problem through incident ,and
priority of the problem is same has incident p5.
but in the problem form, under priority drop down i have 1 - 4,
soo need to change when the incident priority is p5, when problem priority should be p4. only.
in my case its showing p5.
how can i achive this any helps,
thanks,
surya.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 03:09 AM
Got it. thanks for posting the screenshot. My Apologies there were some changes which was there in my Personal instance and hence it caused the confusion.
Solution:
Steps mentioned above remains same . No changes in that.
Only Change: Instead of Source Incident the correct field should be "First Reported By".
Sharing the Business Rule screenshot again for reference to avoid any confusion:
BR Details:
Table name: Problem:
When: Before Insert
Condition: First Reported By is not empty
First Reported By is Not empty AND First Reported By.Number Starts with INC
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if(current.priority == 5){
current.urgency =2;
current.priority = 4;
}
})(current, previous);
Business Rule screenshot for reference below:
Please note you can refer the steps on how to reach to Number field in second condition where it's written starts with. Details for this shared above . If having an issue do let me know.
This should definitely work for you.
Result:
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke