How to close subtasks when parent task is complete

How to close subtasks when parent task is complete

What setting do I need to tweak to cause subtasks to automatically close when the parent task is complete and vice-versa?