# Setup Conditions and Validators

## Jira Workflow **Condition vs Validator**

What’s the Difference?

* **Workflow condition**: Prevents users from seeing or executing a transition unless the required conditions are met. If the condition is not satisfied, the transition button won’t even appear.
* **Workflow validator**: Allows the transition button to be clicked, but **blocks** the transition **after submission** if the criteria aren’t met.

**In short:** Conditions **hide** transitions, while Validators **block** them after submission.

## How Jira workflow validators work

Validators are executed when someone tries to transition an issue. A validator makes sure details are correct when transitioning an issue, and stops the transition if they aren’t. When there are incorrect details, the person transitioning the issue will be prompted to fix them.

### How to add a validator?

1. Edit the workflow that contains the transition.
2. In diagram mode, select the transition arrow and click **Validators** in the properties panel.\
   or\
   In text mode, select the transition's name from the **Transitions (id)** column.
3. Select the **Validators** tab and click on **Add validator** button
4. Choose from the available validators and set any necessary parameters for the validator.
5. Remember to **Publish Draft**

<figure><img src="https://4067441311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh6orV4J25NOSJvrMyLKk%2Fuploads%2F3qCfvDvNCsefv0OY2o2R%2FValidators_list.jpg?alt=media&#x26;token=d7098eb5-bf03-4f00-a14f-5cdf7b1bac83" alt="In the list of available workflow validator, additional validators provided by the Workflow Building Blocks for Jira app will appear, including: Dates Compare Validator, Jira Expression Validator, Linked Issues Validator, Fields Required Validator and Ultimate Validator."><figcaption><p>Validators available after installing Workflow Building Blocks for Jira app (WBB)</p></figcaption></figure>

Learn more about adding validators in [Atlassian's documentation](https://support.atlassian.com/jira-cloud-administration/docs/configure-advanced-issue-workflows/#Add-a-validator)

## How Jira workflow conditions work

Conditions control whether the user can execute a transition. If a condition fails, the user won't be able to execute the transition. For example, the user won't see the transition button on the *View issue* page.

### How to add a condition?

1. Edit the workflow that contains the transition.
2. In diagram mode, select the transition arrow and click **Conditions** in the properties panel.\
   or\
   In text mode, select the transition's name from the **Transitions (id)** column.
3. Select the **Conditions** tab and click on **Add condition** button
4. Choose from the available conditions, and set any necessary parameters for the condition
5. Remember to **Publish Draft**

<figure><img src="https://4067441311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh6orV4J25NOSJvrMyLKk%2Fuploads%2FOEuNRKHgKut8RrHAlSmn%2FConditions_list.jpg?alt=media&#x26;token=dac2611a-4805-4017-b7ff-abac97c8bf7b" alt="In the list of available workflow conditions, additional conditions provided by the Workflow Building Blocks for Jira app will appear, including: Dates Compare Condition, Jira Expression Condition, Linked Issues Condition, Fields Required Condition and Ultimate Condition."><figcaption><p>Conditions available after installing Workflow Building Blocks for Jira app (WBB)</p></figcaption></figure>

Learn more about adding conditions in [Atlassian's documentation](https://support.atlassian.com/jira-cloud-administration/docs/configure-advanced-issue-workflows/#Add-a-condition)

## New workflow editor vs old editor

Recently, in Jira, you may have noticed the new workflow editor, which introduces new terminology. To add conditions and validators, first add a "Rule," then select the appropriate rule type, which can be mapped as follows:

* **Conditions** → Restrict transition
* **Validators** → Validate details
* **Post-functions** → Perform actions

If the new editor does not yet support third-party apps in your Jira instance, you can switch back to the old editor.

<figure><img src="https://4067441311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh6orV4J25NOSJvrMyLKk%2Fuploads%2FIb9vlWxhVIWoeCyLD56h%2FOpen_in_old_editor.png?alt=media&#x26;token=ddde1a67-1d03-4946-9828-999381093950" alt=""><figcaption></figcaption></figure>
