Skip to end of banner
Go to start of banner

JQL Precondition

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »


JSU for Jira Server/Data Center

This is the documentation for JSU for Jira Server/Data Center. If you are using JSU on Jira Cloud, see our JSU Cloud documentation.

Description

The ‘JQL' condition compares the number of issues returned from the JQL query against predefined conditions such as:

  • Must find at least one issue

  • Must not find any issue

  • Compare with a particular number 

Configuration

Write your required JQL expression and choose one option for the number of issues found. For example, Number of issues must > 2.

Example configuration of the JQL condition as described on this page.

For more information on how conditions work in Jira, see Atlassian’s Advanced Workflow Configuration documentation.

Examples

Is the Issue in the current sprint?
Sprint in openSprints() AND key = {issue.key}
In the IT department only the approver can perform the transition
approver = currentUser() OR component != "IT department"

Or in other words: The condition is valid if the current user is the user in the Approver field OR anything not belonging to the IT department. 

All other siblings must have status
parent = {issue.parent} AND key != {issue.key} AND status in (Resolved, Closed)

With parent = {issue.parent} we find all siblings of the current subtask. However, we want to exclude the current subtasks, so we add key != {issue.key}.

See also


You can configure JSU’s preconditions in the following ways:

  • Negate the precondition result

  • Combine the result with the result of previous preconditions using the following options:

    • Discard the result of the previous precondition: Results of the previous preconditions are not taken into account

    • AND: All of the preconditions have to be true to execute the post function

    • OR: Only one of the preconditions has to be true to execute the post function

Example of a precondition configuration as described on this page.

Learn more in Workflow preconditions.

  • No labels