Prevent the creation of sub-tasks unless the parent issue is in a certain status

Use case

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.


โš’๏ธ Configuration

Add the Logical validator to the Create workflow transition.

Expression

Add the following expression replacing the name of the status with the status of your choice:

Bash
%{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.

Bash
Sub-tasks can only be created when the parent issue is in the status In progress.


๐Ÿ“š Related use cases