Show Only Parent Tasks in Task List When Accessed with Project Filter

Hi,

I want to show only parent tasks (is_group = 1) in the Task List View when I open it from a specific project.

Is there a way to automatically filter the list to show only is_group = 1 tasks when accessing it this way?

Can someone help me with the correct client script or method to achieve this?