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? 

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@madhuv 

impact and urgency logic is OOTB handled for incident table and not for incident_task table.

You can configure data lookup rules for incident_task table similar to how it's configured for incident table

No customization required in this case then

Define priority lookup rules 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Bhuvan
Kilo Patron

@madhuv 


Incident task table 'Priority' is not calculated based on impact and urgency.

 

If you want to replicate the functionality same as incident table, make Priority field read-only and make impact & urgency as mandatory and create data lookup rules. Follow below article for reference,

 

https://www.servicenow.com/community/servicenow-ai-platform-forum/how-to-set-priority-based-on-impac...

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

AbinC
Tera Contributor

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]

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