In this use case, we will prevent the creation of sub-tasks when the parent issue of the sub-tasks is in any status different from the one that we specify.
Add the following expression replacing the name of the status with the status of your choice:
%{parent.key} != null IMPLIES %{parent.status} =~ "In Progress"
With this solution the user will get an error message when he clicks on Create after filling up the creation screen. A solution that prevents the user from filling up the sub-task’s creation screen is not possible.
Error message
Add an error message as the following one.
Sub-tasks can only be created when the parent issue is in the status In progress.