The CreatorCon Call for Content is officially open! Get started here.

Incident Task's Priority calculation based on Impact and Urgency

madhuv
Tera Contributor

Hi Forum,

 

We have noticed that Incident Task's priority is not changing when we change the impact and urgency. We even verified the same in OTB (PDI) instance as well. Is it an expected behavior? . If we need to change priority on basis of Impact & urgency (probably as per the configuration in Priority Data Look up rules), what is the better way to handle without customization? 

7 REPLIES 7

AbinC
Tera Guru

Hi @madhuv ,

please try with below code:

 

‘calculatePriority’ Business ruleName: calculatePriority
Table: Global
Script:

 

function calculatePriority(impact,urgency) {
   var pVal = '4';
   //Query the priority lookup table to find the priority based on impact and urgency
   var rec = new GlideRecord('u_priority_lookup');
   rec.addQuery('u_impact', impact);
   rec.addQuery('u_urgency', urgency);
   rec.query();
   while(rec.next()){
      pVal = rec.u_priority;
   }
   return pVal;
}
 
if you found this helpful please accept this as solution 
 
Thanks,
Abin

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @madhuv "The priority lookup is available out-of-the-box (OOTB) only for the Incident table, not for the Incident Task. If you want similar functionality for Incident Task, you’ll need to create a new custom priority lookup table specifically for it and use that. I don’t recommend writing or using any custom code or scripts—instead, follow the OOTB approach using the priority lookup mechanism. Creating a new custom table for the lookup is the best way to achieve this.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ajay_Chavan
Kilo Sage

 

Hi @madhuv ,

this is the expected behavior for Incident Tasks. Unlike parent Incidents, Incident Tasks don’t automatically inherit priority calculation from Impact/Urgency.

 

Priority Data Lookup Rules are usually set up for the Incident table only.

 

To get around this, you can create a Business Rule on the Incident Task table. This rule will trigger whenever Impact or Urgency changes, and then it will calculate the priority using the same logic as incidents.

 

 

 

 

 

Glad I could help! If this solved your issue, please mark it as Helpful and Accept as Solution so others can benefit too.*****Chavan A.P. | Technical Architect | Certified Professional*****