Close parent task if all child tasks are closed

Rishabh Mehta
Giga Contributor

Hi All,

I have a requirement to close the parent if all child tasks are closed / put parent on hold if all children are on hold / withdraw parent if all children are withdrawn. It is basically to be done for a scoped application CONTINUAL SERVICE IMPROVEMENT. 

Here the parent is CSI Plan and child is CSI task. There is a field called csi plan (reference field) present on the CSI task form to show that the task is related to that specific CSI plan. 

 

Regards,

Rishabh

6 REPLIES 6

Hi @Deepak Ingale,

I'm working on a similar case and I'm using your code, I'm trying to understand what this line of code means?

pGr.addQuery("sys_id", current.parentTableReferenceField);

Is it the querying the parent table? I'm confused about what it is doing inside the brackets. 

 

Thank you,

Shuha

 

what if there is more than one child record and only one is closed other on is still open