Parent Child Incident Tickets Synchronization

zaxjun
Tera Contributor

I have a child and parent incident and I want to have them both synchronized especially to these 3 fields (state, priority, notes).

1 ACCEPTED SOLUTION

raja0077
Tera Expert

Hi @zaxjun ,

If you want synchonize parent and child incident means ,You need to write a business rule in Incient.

 

1.Child to Parent

      var childToParent = new GlideRecord('incident');

       if (childToParent.get(current.parent)) {

          childToParent.state = current.state;

          childToParent.priority = current.priority;

          childToParent.work_notes = current.work_notes; 

          childToParent.update();

       }

2.Parent to child

  • Incident have OOB business rule called "Update Child Incidents",In this business rule you can  add additional fields to updation from parent to child. 

     

  • raja0077_1-1696915921761.png

     

Thank you.

View solution in original post

7 REPLIES 7

zaxjun
Tera Contributor

This is a perfect solution. Thank you Raja!

zaxjun
Tera Contributor

Hello Raja, Good day! Another question is, why is it only 1 child will be updated? Why not all child connected to the parent ticket.

Hello @zaxjun Welcome back,

Can you please recheck it once because if you update parent means child also get updated.

 

 For example,

 One parent have multiple child incidents 

  •  We have One parent and Two child means ,If you update state new to in progress in parent means it will affect child also.
  • But if you change the state close in parent means it will not affect in child .This default rule in OOB .Because who create the incident only can close the state or that incident automatically close in 7 day(  Auto closure () ).

raja0077_0-1697119626856.png

Thanks @zaxjun 

Have a great day !!!