It may be possible with automation, but I believe the most common way is with workflow modifications.
In the workflow for the parent issue type(s), go to the transition that you want to block. In my screenshot, I'm preventing the parent ticket from moving to In QA if there are any subtasks open; you'd use whichever transition marks a ticket as Done.
Add a Condition, then select Sub-Task Blocking Condition.
Then select which status (or statuses) your sub-tasks must be in in order to allow the parent to transition.
Publish your workflow, and that's all there is to it!
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events