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.
Use case Workflow function Parser functions
Prevent a transition depending of the number of components

Logical validator

Logical condition

numberOfSelectedItems()

Prevent a closed issue from being reopened after resting 1 week closed

Logical validator

Logical condition

isInRole()

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

Logical validator

Block an Epic's transition until all the issues under that Epic are resolved

Logical validator

Logical condition

count()

issuesUnderEpic()

filterByResolution()

Block an Epic's transition depending on linked issues status and due date

Logical validator

Logical condition

count()

filterByPredicate()

linkedIssues()

Evaluate Assets objects

Logical validator

Logical condition

findPattern() findReplaceAll() replaceAll() toStringList()

Prevent setting due dates outside business hours

Logical validator

Logical condition

withinCalendar()

Ensure that all issues linked with a certain issue link type have "Due Date" field set

Logical validator

Logical condition

count()

linkedIssues()

fieldValue()

Validation based on the value of a date type project property

Logical validator

Logical condition

stringToDate()

projectProperty()

Prevent issue creation if description contains less than 100 characters

Logical validator

replaceAll() length()

Restrict issue creation per issue type and project role

Logical validator

isInRole()

Validate a Select List (cascading) custom field

Logical validator Logical condition


Ensure that an issue has at least one attachment

Logical validator

Logical condition

Prevent issue creation with the same field value (Boolean)

Logical validator

Validation based on JQL query

count()

issuesFromJQL()

Validate only issue links created in transition screen

Logical validator

count()

transitionLinkedIssues()

filterByProject()

filterByIssueType()

Reject duplicated file names in attachments

Logical validator

Logical condition

count()

toStringList()

distinct()

Prevent external users from creating issues

Logical validator

matches() toString() textOnStringList() toStringList() userDisplayName()

Halt a transition if an element is not contained in a list

Logical validator Logical condition

toStringList()

Block a transition until all sub-tasks have certain fields populated

Logical validator

Logical condition

count()

filterByPredicate()

subtasks()

Make "Time spent" field required

Logical validator