In this use case the Validation of sub-tasks will be used to only allow to close the parent, if all sub-tasks have been closed.
Add the Validation of sub-tasks to the desired workflow transition.
Select Closed and Done.
Check the following options:
Checking this option allows you to skip the issue type filter.
Condition on sub-tasks
Validation of sub-tasks