# Introducing WHEN -> THEN clauses

The [**Ultimate Validator**](/workflow-building-blocks-for-jira/conditions-validators/ultimate.md) has been upgraded to make it easier than ever to require fields conditionally, based on issue content.

This feature simplifies common scenarios such as:

* Making a field required **only if another field has a certain value**.
* Making **different groups of fields** required depending on the option selected.
* Enforcing checkbox selection (e.g. *consent checkbox*) based on answers provided.

### Why **WHEN → THEN** Clauses?

Previously, you could use the **OR** operator to simulate conditional logic. While functional, it required “reversing” the logic, which was not intuitive.

**Example – old approach (using OR):**

* FieldA = single select.
* FieldB should be required if optionB is selected in FieldA .
* To configure this, you would:
  1. Check whether *optionB* is **not** selected.
  2. OR, if it is selected, check whether FieldB is not empty.

<figure><img src="/files/f0W3W04GRvHrsktRNJPg" alt="Jira Ultimate Validator setup example showing old approach to make a field required conditionally using OR logic"><figcaption></figcaption></figure>

This works because the second clause (mandatory field) is only checked when the first clause is false. However, the logic is reversed, which makes it harder to read.

### The New Approach: **WHEN → THEN**

With WHEN → THEN clauses, the same case can now be expressed naturally:

1. When optionB is selected
2. Then require FieldB to be not empty

<figure><img src="/files/muInURNp9yzMklNPzd9f" alt="Jira Ultimate Validator setup example showing new approach to make a field required conditionally using When-Then logic"><figcaption></figcaption></figure>

Conditions separated by a **THEN** connector are wrapped in parentheses, allowing you to safely combine multiple requirements.

**Example – multiple options:**

* Make two fields (FieldB, FieldC) mandatory if optionB **or** optionC is selected.

<figure><img src="/files/wchsiELDkJTRVYf90nyO" alt="Jira Ultimate Validator setup example showing new approach to make a field required conditionally using When-Then logic, where AND and OR conditions can be safely used between Then blocks"><figcaption></figcaption></figure>

### **AND WHEN** Clauses

For more complex scenarios, you can chain multiple conditional blocks with **AND WHEN**.

**Example – different fields required for different options:**

1. FieldB is required WHEN optionB is selected.
2. FieldC is required WHEN optionC is selected.
3. FieldE is required WHEN optionD **or** optionE is selected.

<figure><img src="/files/aLQ036jqrBfr16SwEJlB" alt="Jira Ultimate Validator example showing how different sets of fields can be made required based on the selection of different options using When-Then logic"><figcaption></figcaption></figure>

With Ultimate Validator, you can combine all your field requirements into a single workflow validator or condition, making complex validations simple and easy to manage.

### Jira Expression Preview

At the bottom of the configuration screen—just like in all our validators—you’ll find the **Jira Expression Preview** panel. This shows the exact Jira Expression generated from your setup, so you can confirm the validator does what you expect.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.forgappify.com/workflow-building-blocks-for-jira/administrator-guide/ultimate-validator-when-then-clauses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
