---
title: "JQL condition"
canonical: "https://support.appfire.com/space/JSU/12681775/JQL%20condition"
format: markdown
---
> Macro (aura-html)

> ℹ️ The JQL condition is available in our Data Center app only. If you are using JSU on Jira Cloud, see our JSU Cloud <u>[documentation](https://appfire.atlassian.net/wiki/spaces/JSUCLOUD/pages/12518591)</u>.

## 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.](media://2731c457-01b6-485b-b794-6e0c5da71c0a)

For more information on how conditions work in Jira, see Atlassian’s [Advanced Workflow Configuration](https://confluence.atlassian.com/adminjiraserver073/advanced-workflow-configuration-861253591.html) documentation.

> ℹ️ #### JQL-based validators and conditions on the Create transition
> ℹ️ 
> ℹ️ When a validator or condition that uses JQL is configured on the **Create transition** (initial state transition), the work item has not yet been created in Jira. As a result, the item key does not exist at validation time.
> ℹ️ 
> ℹ️ Because of this, JQL expressions that rely on `{issue.key}` (for example, `key = {issue.key}`) cannot be evaluated and may block item creation.
> ℹ️ 
> ℹ️ To use `{issue.key}` in a JQL expression, configure the validator or condition on a transition that occurs after the work item has been created.

## 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"
```

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

- [JQL Reference](https://appfire.atlassian.net/l/cp/Bq7bwnwp)
- [ Supported Field Types](https://appfire.atlassian.net/l/cp/wMNWeU83)