This will re-create the out of box filter:

current.addEncodedQuery('top_task=' + parent.sys_id);

so it looks like the full one would be:

current.addEncodedQuery('top_task=' + parent.sys_id + '^u_dependency_typeINinternal,external,3rd_party,other');

'parent' here refers to the pm_project table record.

 

View solution in original post