Code to check ticket status for all children of a parent

To List,

Can someone help me with the code to get the code to check ticket status for
all or each child children of a parent?

Thanks.

Kenn
LBNL