Condition on sub-tasks

This condition can hide a transition based on the state and the number of an issue's sub-tasks.

The condition only makes sense when used in a workflow used by standard issue types.

You can specify multiple filter criteria that will be "and concatenated". By default, all sub-tasks must match the combination of all criteria.  

🛠️ Configuration

Filter by issue type

If you select specific issue typesall sub-tasks must be of any of the selected issue types. If sub-tasks with other issue types are found, the condition will fail.

The additional filters can be used to further restrict the issues to be analyzed.

If you leave this filter blank, e.g. if the issue type is irrelevant, you must check the additional option Skip issue type filter / issues in unselected issue types.

If you select specific issue types and also check the additional option Skip issue type filter / issues in unselected issue types, the additional criteria (status, resolution, field value) will only be applied to the selected issue types.

Filter by status

If you select specific statusesall sub-tasks must be in any of the selected statuses. If sub-tasks with other statuses are found, the condition will fail.

The additional filters can be used to further restrict the issues to be analyzed.

If you leave this filter blank, e.g. if the status is irrelevant, you must check the additional option Skip status filter / issues in unselected statuses.

If you select specific statuses and also check the additional option Skip status filter / issues in unselected statuses, the additional criteria (issue type, resolution, field value) will only be applied to the issues in the selected statuses.

Filter by resolution

If you select specific resolutionsall sub-tasks must have any of the selected resolutions. If sub-tasks with other resolutions are found, the condition will fail.

The additional filters can be used to further restrict the issues to be analyzed.

If you leave this filter blank, e.g. if the resolution is irrelevant, you must check the additional option Skip resolution filter / issues with unselected resolutions.

If you select specific resolutions and also check the additional option Skip status filter / issues in unselected statuses, the additional criteria (issue type, resolution, field value) will only be applied to the issues with the selected resolutions.

Filter by field value

Optionally limit the sub-tasks to be counted or analyzed by their field values. To achieve this you must enter an expression in Logical mode. The expression must return  true or false

Examples: 

Expression

Description

Bash
%{seed.issue.assignee} != null 

All sub-tasks must be assigned to a user. If unassigned sub-tasks are found, the condition will fail.

Values in sub-tasks have to be referenced by their seed field codes.

Bash
%{issue.dueDate} <= %{seed.issue.dueDate}

All sub-tasks must have a due date of equal to or later than the current issue's due date.

Values in sub-tasks have to be referenced by their seed field codes.

If you specify an expression and also check the additional option Skip issues with unmatched field values, the additional criteria (issue type, resolution, field value) will only be applied to the issues that match the expression.

Minimum number of sub-tasks

Specify the minimum number of sub-tasks that need to satisfy the specified filter criteria. The default value is 0 to ensure the condition passes if the current issue does not have any sub-tasks.

If you set this number to 1, the condition will fail if the issue does not have any sub-tasks or if the existing sub-tasks don't match the specified filter criteria.

Maximum number of sub-tasks

Specify the maximum number of sub-tasks that need to satisfy the specified filter criteria. The default value is 1000.

If you set this number to 1, the condition will fail as soon as more than one sub-task satisfies the specified filter criteria.

Additional options

The following options can be used to refine the number of issues you want to analyze in this condition.

Per default all filters are mandatory, filters are "and concatenated" and you cannot save your configuration unless you have specified values. Any sub-task being analyzed by the condition must match all criteria.

If you leave a filter blank you must check the additional option to skip the filter. Otherwise you cannot save your configuration.

The additional options allow you to override the default behavior.

Filter

Additional option

Description

No value selected

Not checked  cross mark

Not possible. If you want to skip the filter you have to uncheck the corresponding additional option.

No value selected

Checked  check mark

Skip this filter completely. An equivalent would be to select all available options, e.g. all issue types are allowed.

One or multiple values selected

Not checked  cross mark

Enforce that all sub-tasks which are analyzed must have the selected values, e.g. only selected issue types are allowed.

One or multiple values selected

Checked  check mark

Issues not matching the specified value are allowed and will be ignored when evaluating whether the condition passes.

By default, whenever a value is selected in a filter it will be combined with all other filter criteria and all sub-tasks must match the filter combination.

If you only want to analyze specific issue types (e.g. "Test cases"), select "Test case" in the issue type filter and check the corresponding additional option. This way, other sub-tasks (which are not "Test cases") can exist and will not be considered.

Examples

The table below lists a few example configurations and their JQL equivalent.

Configuration

JQL

  • Issue type: Sub-task

  • Status: Closed

  • Resolution: blank

  • Additional options: 

    • Skip resolution filter

type = Sub-task AND status = Closed
  • Issue type: Sub-task

  • Status: Closed

  • Resolution: blank

  • Additional options: 

    • Skip issue type filter

    • Skip resolution filter

(type = Sub-task AND status = Closed) OR type != Sub-task
  • Issue type: Sub-task

  • Status: Closed

  • Resolution: Done

  • Additional options: 

    • Skip issue type filter

    • Skip resolution filter

(type = Sub-task AND status = Closed AND and resolution = Done) OR type != Sub-task OR resolution != Done

Option

Description

Skip issue type filter / issues in unselected issue types

The issue type is irrelevant for this condition or sub-tasks in non-selected issue types will be ignored when evaluating whether the condition passes.

Skip status filter / issues in unselected statuses

The status is irrelevant for this condition or sub-tasks in non-selected statuses will be ignored when evaluating whether the condition passes.

Skip resolution filter / issues with unselected resolutions

The resolution is irrelevant for this condition or sub-tasks with non-selected resolutions will be ignored when evaluating whether the condition passes.

Skip issues with unmatched field values

Field values are irrelevant for this condition or sub-tasks with unmatched field values will be ignored when evaluating whether the condition passes.

If you want to use this functionality in a validator instead, have a look at the following validator: Validation of sub-tasks

📚 Use cases and examples

Use case Workflow function
Specific sub-tasks must be resolved

Condition on sub-tasks

Validation of sub-tasks

Prevent users from selecting specific fix versions

Condition based on regular expression

Validation based on regular expression

All sub-tasks must be resolved

Condition on sub-tasks

Validation of sub-tasks

Prevent a transition depending of the number of components

Logical validator

Logical condition

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

Logical validator

Logical condition

Prevent issue from being "Closed" if blocking issues are not closed yet.

Validation of linked issues

Add comment with the request participants' display name

Add comment

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

Logical validator

Create issue under epic

Create issue

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

Logical validator

Logical condition

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

Logical validator

Logical condition

Get attributes of Assets objects

Execute remote action

Log absence time on another issue

Log work

Escalate issue to assignee's supervisor

Copy JWT user property

Prioritize the issues globally

Update or copy field values

Automatically fill an insight custom field after a transition

Update or copy field values

Prevent transitioning when there is a blocking issue

Validation of linked issues

Move an issue to another issue type

Move issue

Evaluate Assets objects

Logical validator

Logical condition

Create an internal Service Management comment on linked issues

Update or copy field values

Alert the reporter

Add comment

Create issues randomly

Create issue

Make the assignee required

Fields required

Fields required or changed

Create a sub-task for every sub-task closed

Create issue

An issue must have at least 3 resolved Test Cases

Condition on sub-tasks

Validation of sub-tasks

Prevent issue creation with the same field value

Validation based on JQL query

Logical validator

Obtain a value from an Elements Connect custom field

Send email

Only watchers can execute a transition

Only users in a field

Proceed with a task only when all sub-tasks are completed

Condition on sub-tasks

Validation of sub-tasks

Clone epic, tasks and sub-tasks

Create issue

Prevent setting due dates outside business hours

Logical validator

Logical condition

Set a date on the same week day on alternate weeks

Update or copy field values

Prevent creation of issues with a duplicate summary

Validation based on JQL query

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

Logical validator

Logical condition

A developer must not execute the transition

User is not in project role

Set a Date Picker field to the nth day of the month

Update or copy field values

Alert the assignee of important issues

Add comme nt

Set the next fix version

Update or copy field values

Create Confluence page with links to issues

Execute remote action

Set reporter as assignee if a User Picker field is empty

Update field based on rules

Set fix version based on its start and release date

Update or copy field values 

Add user to field depending on selected options

Update field based on rules

Set Due Date with latest value among sub-tasks

Update or copy field values

Create sub-tasks depending on selected values in custom field

Create issue

Assign important issues to the project lead

Update or copy field values

Validation based on the value of a date type project property

Logical validator

Logical condition

Automatically log work on a Jira issue

Execute remote action

Add percentaged profit margin when closing issue

Log work

Only users in a project role can execute a transition

Users are/aren't in project role (validator)

Users are/aren't in project role (condition)

Prevent issue creation if description contains less than 100 characters

Logical validator

Reopen parent issue, if a sub-task is reopened

Transition issue

Extract an email address from the last comment

Copy excerpted value

Shorten the summary to a maximum number of characters

Update or copy field values

Create an overview page for a software release

Execute remote action

All blocking issues must be resolved

Condition on linked issues

Validation of linked issues

Create an issue with a custom summary

Create issue

Set issue security level depending on reporter

Update field based on rules

There must be at least one related Service Management request

Condition on linked issues

Validation of linked issues

Keep the status of parents and sub-tasks in sync (post function use case)

Transition issue

All sub-tasks with a resolution of Done must be in a specific status

Condition on sub-tasks

Validation of sub-tasks

Clone issue in external instance

Execute remote action

Remove remaining estimate when an issue is closed

Update field action

Match several values of a list

Update or copy field values

Create a sub-task for each component

Create issue

Format the issue's summary according to specified rules

Format field value

Assignee may only have a restricted number of assigned issues

Condition based on JQL query

Validation based on JQL query

Create three issues with individual summaries

Create issue

Create a component to group issues related to UI design

Execute remote action

Link issue to issue keys in its description

Create issue link

Assign issue to current user

Update or copy field values

Restrict issue creation per issue type and project role

Logical validator

Validate a Select List (cascading) custom field

Logical validator Logical condition

Keep parent issue's priority in sync

Update or copy field values

Ensure that an issue has at least one attachment

Logical validator

Logical condition

Assign issue to the default user of a role

Assign to project role

Notify the reporter of an issue about its status by a Telegram message

Execute remote action

Prevent issue creation with the same field value (Boolean)

Logical validator

Validation based on JQL query

Set the assignee of an external issue same as the transitioned issue

Execute remote action

Validate only issue links created in transition screen

Logical validator

Add assignee as watcher to every blocking issue

Update linked issue or sub-task

Add internal Jira Service Management comment

Add comment

Add sub-tasks to an automatically created issue

Create issue

Start Progress on parent, if sub-tasks are started

Transition issue

Create several issues combining fields

Create issue

Transition an external Jira ticket based on the linked internal one

Execute remote action

Create a comment on an external Jira ticket

Execute remote action

Prevent having the same assignee in two sub-tasks
Set assignee based on a former assignee

Update or copy field values

Automatically log work spent in a specific status

Log work

Set assignee based on priority

Update field based on rules

Automatically link an issue to an external one

Execute remote action

Reject duplicated file names in attachments

Logical validator

Logical condition

Only user specified in project property is allowed to execute transition

Condition on JWT project property

Validation of JWT project property

All sub-tasks must be Done or Closed

Condition on sub-tasks

Validation of sub-tasks

Create a personal space for a new employee

Execute remote action

Triage issues created by email

Move issue

Get Hubspot contact information

Execute remote action

Prevent external users from creating issues

Logical validator

Link a Jira issue with the corresponding release ticket

Execute remote action

Get Checklist

Execute remote action

Add watchers ignoring inactive users

Update or copy field values

Add watchers based on issue type

Add or remove watchers

Add a table with the elements of a text to an email

Send email

Copy latest due date from sub-tasks

Copy field values from linked issues or subtasks

Hide transition to a previous status

Logical condition

Copy formatted description of issue into email

Send email

Automatically assign a tester during your development process

Assign to project role

Create a new employee account during an onboarding process

Execute remote action

Hide transition from issue creator

Except users in field

Remove blocking links when blocking issue is closed

Delete issue link

Make the description required

Fields required

Fields required or changed

Create several sub-tasks depending on the component

Create issue

Read the information from a Trello card

Execute remote action

Extract the issue priority from the summary

Copy excerpted value

Set custom IDs for each issue

Set or create JWT project property

Update or copy field values

Add days skipping weekends and holidays to a Date Picker field

Update or copy field values

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

Logical validator Logical condition

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

Logical validator

Logical condition

Fast-track transition issues assigned to the project lead

Transition issue

Set Checklist

Execute remote action

Restrict the issue creation with specific issue types to certain project roles

Users are/aren't in project role (validator)

Create an external project for a new employee during an onboarding process

Execute remote action

Automatically create a version when starting the release

Execute remote action

Create an issue in the current project

Create issue

Create a sub-task for every user in a field and assign them

Create issue

Translate the description

Execute remote action

Move an issue to another project

Move issue

Calculate custom sequence numbers

Update or copy field values

Set or create JWT project property

Link to the linked epic from the current issue
Copy highest priority from linked issues

Copy field values from linked issues or subtasks

Keep track of important status updates

Update or copy field values

Fields required or changed

Current user must be reporter

Compare two values condition

Compare two values validator

Create a sub-task for every recurring deadline within a task

Create issue

Change the assignee to the next evaluator

Update or copy field values

Close parent issue only when all sub-tasks are closed

Condition on sub-tasks

Validation of sub-tasks

Retrieve the assets of an issue in Jira cloud

Execute remote action

Link to JQL query with information from issue
Set a watcher based on custom field value

Add or remove watchers

Make "Time spent" field required

Logical validator

Set a condition in a global transition which only applies in a certain status

Logical condition

Add comment when creating issues outside of business hours

Add comment

Set assignee depending on issue type

Update field based on rules

Inline images in a generated email

Send email

Set specific default assignee if not set

Copy JWT project property

Create child issue within Advanced Roadmaps hierarchy

Create issue

Keep the status of an issue and its linked issues in sync

Transition issue

Resolution must be empty

Fields required

Fields required or changed

Add or remove request participants

Update or copy field values

Add attachments from current issue to cloning issues

Update linked issue or sub-task

All sub-tasks in the Closed status must have a specific resolution

Condition on sub-tasks

Validation of sub-tasks

Send email after transitioning to specific status

Send email

Send email with the URL of the attachments included in the description

Send email

Add a hyperlink to an issue in an email

Send email