Incident task priority to be inherited from the incident

clivebushell
Giga Contributor

Hi,

How do I ensure that when you open and create a new Incident Task from an Incident ticket, that it inherits the priority from the Incident ticket?

Many thanks

1 ACCEPTED SOLUTION

Couldn't you just dot-walk from the task to the incident... then obtain the priority from there?



Just thinking that it's a read-only value and won't change throughout related records, so makes sense to keep it in one location and display it in several, rather than copy it throughout different records (then factor in cascade updates if the incident priority changes)


View solution in original post

22 REPLIES 22

anurag92
Kilo Sage

Hi Clive,



Just curious, have you set up a 'Priority Lookup' definition on task table same as Incident table?


If no, can you try putting logs in your BR to check if the BR is being encountered.


Hi Anurag,



I can confirm that I haven't added any lookup on the task table.



Your have to help me out at adding logs on the BR?



Many thanks



Clive


anurag92
Kilo Sage

Try this in the script part of BR:



(function executeRule(current, previous /*null when async*/) {




  // Add your code here


  gs.log("Inside Business Rule");


  gs.log("Parent Priority is:"+current.parent.priority);


  current.priority = current.parent.priority;


  gs.log("Current Priority is:"+current.priority);




})(current, previous);



Search under system logs (syslog.list) and search for the logged messages. If you don't get any logs, BR is not running, you might need to recheck the conditions.



If you undefined in 2nd or 3rd log, check the values accordingly. Let me know if this helps.


Done that and couldn't see anything in the system logs 😞


anurag92
Kilo Sage

Did you check logs from here? Try creating an incident task and then check the logs.



find_real_file.png