> For the complete documentation index, see [llms.txt](https://docs.forgappify.com/field-rules/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.forgappify.com/field-rules/jira-administrator/conditions.md).

# Conditions

Reference for Field Rules preconditions - field operators by type, user, group and role matching, AND, OR and NOT groups, and view-specific limits.

Rules in Field Rules support optional **preconditions** that control when a rule applies. When preconditions are configured, the rule applies only when they are met. When no preconditions are set, the rule always applies to every user who opens a matching screen.

There are two types of preconditions: **field conditions** and **user conditions**. Both can be combined on the same rule. When both are present, the user conditions must be met, and so must the field conditions taken as a whole.

The JSM Agent views behave like their standard equivalents, so this page names only the standard views.

***

## Field conditions

A field condition checks the current value of a field on the screen and compares it to a configured value using an operator.

### How field values are read

Field conditions check the **working state** of the form at the moment the rule evaluates. This includes:

* Values already saved on the work item (Issue View, Issue Transition)
* Values the user has entered during the current session
* Values set by rules that ran earlier in the same UIM

See [Execution order](https://docs.forgappify.com/field-rules/jira-administrator/execution-order.md) for how to use this.

### Available fields

Any field supported by the UI Modifications API on the current view can be used in a field condition, as long as it is on the screen. The full list is in [Supported fields per view](https://docs.forgappify.com/field-rules/jira-administrator/supported-fields-per-view.md).

A condition on a field that is not on the screen is never met, whatever the operator, including is empty and does not equal. Issue Transition is the exception, see below.

Beyond those, the following fields are always available, whether or not they are on the screen:

**Project** - the space of the work item or of the create screen. Available on every view except JSM Request Create.

**Issue Type** - the selected work type. Available on every view except JSM Request Create. When the user changes the work type, the rules run again as when the screen opens, so Change field value rules do not react to it.

**Request Type** - the request type chosen by the customer on JSM Request Create, or the request type of the work item on the JSM Agent views. Request Type uses the same operators as Issue Type (equals, does not equal, is one of, is not one of). Use it to apply different rules to different request types in the same portal or service space.

On **Issue Transition**, a field can be used in a condition even when it is not on the transition screen, or has no supported action there: its value is read from the work item. Any field type supported by the UI Modifications API is available, see [Supported fields per view](https://docs.forgappify.com/field-rules/jira-administrator/supported-fields-per-view.md).

This also covers **Status** and **Resolution**:

**Status** - the work item's current status. Not available on Global Issue Create, because a new work item has no status yet.

**Resolution** - the work item's current resolution. Available only on Issue Transition.

### Transition conditions

On **Issue Transition**, four extra conditions let a rule react to the transition being performed.

**Transition name** - the name of the transition, for example "Resolve" or "Start progress". Because it matches by name, one condition works across spaces that share the same transition name.

**Transition ID** - a specific transition identified by its ID. Use this when you need to target one exact transition in a single workflow.

**Transition destination status** - the status the transition moves the work item to, not the work item's current status.

**Transition destination status category** - the category of the destination status: To Do, In Progress, or Done.

All four use the single-choice operators (equals, does not equal, is one of, is not one of). Pick a value from the suggestions, or type your own.

<figure><img src="https://1561395444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOfQTst0rZQxXAZF84TB5%2Fuploads%2Fgit-blob-0e45fe678ac878b3af3a8532ad608a5a8c98aa50%2Ftransition-conditions-rule-builder.png?alt=media" alt="A Make field required rule on the Rejection reason field with two transition preconditions: Transition name equals Reject, or Transition destination status is one of Declined"><figcaption><p>Requiring "Rejection reason" whenever the transition is named "Reject" or its destination status is "Declined".</p></figcaption></figure>

{% hint style="info" %}
Further reading: [Conditional fields on Jira transition screens - without scripting](https://community.atlassian.com/forums/discussion/3287538/conditional-fields-on-jira-transition-screens-without-scripting) walks through everything Field Rules can do on transition screens, with examples.
{% endhint %}

### Condition groups

Field conditions are arranged in groups. Each group joins its conditions with **AND** or **OR**, shown on the pill between them:

* **AND** - all conditions in the group must be met
* **OR** - at least one condition in the group must be met

A group can hold other groups, so one rule can mix both: Priority equals Highest AND (Labels contains any of customer OR Components contains any of Payments). Groups nest up to 3 levels, counting the top level.

**NOT** - choose **Negate group** in a group's menu to reverse it. A NOT group is met when the group without NOT is not met. The top level can't be negated, so wrap its conditions in a group first.

A condition on a field that is not on the screen stays not met inside a NOT group too, so NOT can't be used to check that a field is missing. In an OR group, the other conditions can still meet the group.

User conditions are not part of the groups.

Rules created before groups were added open with their conditions grouped the way they have always been evaluated, left to right: A OR B AND C opens as (A OR B) AND C. They work as before.

### Operators by field type

The available operators depend on the type of the field being checked.

**Single-choice fields**\
Applies to: single select, radio buttons, resolution, project, project picker, parent

| Operator       | Passes when                                   |
| -------------- | --------------------------------------------- |
| equals         | the field value matches exactly               |
| does not equal | the field value does not match                |
| is one of      | the field value is in the configured list     |
| is not one of  | the field value is not in the configured list |
| is empty       | the field has no value                        |
| is not empty   | the field has any value                       |

Issue Type and Status do not support "is empty" / "is not empty" because they always carry a value.

**Multiple-choice fields**\
Applies to: multi-select, checkboxes, fix versions, affects versions, components, labels

| Operator              | Passes when                                                           |
| --------------------- | --------------------------------------------------------------------- |
| contains any of       | the field contains at least one of the configured values              |
| contains all of       | the field contains every one of the configured values                 |
| contains none of      | the field contains none of the configured values                      |
| equals (in any order) | the field contains exactly the configured values, regardless of order |
| is empty              | the field has no values selected                                      |
| is not empty          | the field has at least one value selected                             |

**Cascading select fields**

All single-choice operators apply to the parent (first-level) value. In addition, each operator has a "child" variant that evaluates the child (second-level) value:

* child equals
* child does not equal
* child is one of
* child is not one of
* child is empty
* child is not empty

For example: "parent is one of Engineering" AND "child equals Platform" targets a specific branch of the cascading hierarchy.

**Text fields**\
Applies to: text field, paragraph, summary, description

| Operator         | Passes when                                      |
| ---------------- | ------------------------------------------------ |
| equals           | the text matches exactly (case-sensitive)        |
| does not equal   | the text does not match                          |
| starts with      | the text begins with the configured string       |
| ends with        | the text ends with the configured string         |
| contains         | the text includes the configured string anywhere |
| does not contain | the text does not include the configured string  |
| is empty         | the field has no text                            |
| is not empty     | the field has any text                           |

**Number fields**\
Applies to: number, original estimate

| Operator                 | Passes when                         |
| ------------------------ | ----------------------------------- |
| equals                   | the number matches                  |
| does not equal           | the number does not match           |
| greater than             | the field value is strictly greater |
| greater than or equal to | the field value is greater or equal |
| less than                | the field value is strictly less    |
| less than or equal to    | the field value is less or equal    |
| is empty                 | the field has no value              |
| is not empty             | the field has a value               |

Original estimate values are compared in minutes.

**Date fields**\
Applies to: date picker, date time, due date

| Operator       | Passes when                                     |
| -------------- | ----------------------------------------------- |
| is before      | the date is earlier than the configured date    |
| is after       | the date is later than the configured date      |
| equals         | the date is the same day as the configured date |
| does not equal | the date is on a different day                  |
| is empty       | the field has no date                           |
| is not empty   | the field has a date                            |

Dates are compared by calendar day, in the time zone set in the user's profile. For a date time field only the day counts: 29 Oct 14:00 equals 29 Oct, and is neither before nor after it.

Date conditions support a dynamic value, **Time of execution** (NOW), the moment the rule runs:

* With equals and does not equal, NOW is today, for both date and date time fields.
* With is before and is after, a date field is compared with today, so "Due date is before NOW" passes from the day after the due date. Use it to detect overdue work items. A date time field is compared with the exact current time.

**User fields**\
Applies to: assignee, reporter, user picker (single), multi user picker, people (multi)

Single-user fields (assignee, reporter, user picker) use the single-choice operators. Multi-user fields (multi user picker, people) use the multiple-choice operators.

All user fields offer **Current user** as a value: the person viewing the screen. It can be picked alone or together with other users. Examples: "Assignee equals Current user" to target work items assigned to the viewer, "Assignee is one of Current user, a team lead" to also include the team lead's work items, or "Reporter does not equal Current user" to exclude the reporter from a rule.

**Priority field**

Priority uses the single-choice operators except is empty and is not empty, because a priority always has a value. It also supports greater than, greater than or equal to, less than and less than or equal to, which compare priority levels.

### Examples

**Work type condition**\
Show a "Steps to reproduce" field only when Issue Type equals "Bug". Users creating tasks, stories, or epics never see the field.

**Multi-value condition**\
Require a "Review notes" paragraph when Labels contains any of "needs-review", "pending-approval". Either label triggers the requirement.

**Grouped conditions**\
Make "Root cause" required when Priority is one of Highest, High AND (Labels contains any of "customer" OR Components contains any of "Payments"). A high priority work item that a customer reported or that affects Payments needs a root cause, others don't.

**NOT group**\
Make "Justification" required unless the change is routine: NOT (Priority equals Lowest AND Labels contains any of "routine"). Every work item needs a justification, except low priority ones labelled routine.

**Project condition within a multi-space UIM**\
A UIM covers three spaces. Apply a specific rule only to one of them using a Project condition, without creating a separate UIM.

**Transition condition**\
Require a "Rejection reason" field only when the Transition name is "Reject" by adding that condition to a Make field required rule. Reviewers must explain a rejection, but are not asked for a reason when they approve.

***

## User conditions

A user condition checks the identity of the user currently viewing the screen. It can match against specific user accounts, group memberships, or roles in any combination.

### Criteria

A single user condition can include:

* **Specific users** - a list of named Jira user accounts
* **Groups** - membership in one or more Jira user groups
* **Project roles** - having one or more of the listed roles in the work item's space

When multiple criteria are configured within a single user condition, they use **OR** logic: the condition passes if the user matches any of the listed criteria.

### Modes

| Mode             | Applies when                                             |
| ---------------- | -------------------------------------------------------- |
| **For users**    | The user matches at least one of the configured criteria |
| **Except users** | The user does not match any of the configured criteria   |

Use "Except users" to exempt a specific group from a restriction. For example: lock a field for everyone except members of the "Release Managers" group.

### JSM Request Create limitations

On **JSM Request Create**, user conditions work differently:

* **Project roles are never matched.** Every user counts as having none of the listed roles.
* **Groups are not matched for portal-only customers.** A customer account counts as a member of none of the listed groups. Licensed users are checked as usual.

So a For users condition with only roles never applies on the portal, and an Except users condition with only roles always does. To target specific customers, list their accounts under **Specific users**.

### Examples

**Apply to a specific group**\
Lock the "Fix Version" field with a user condition set to "For users" selecting the "Developer" group. Developers see the field as read-only; all other users can edit it.

**Exempt a role**\
Enable self-assignment only for everyone with a user condition set to "Except users" and the "Project Manager" role selected. Project managers can assign freely; everyone else is restricted to self-assignment.

**Target a specific user account**\
Show an "Internal escalation notes" field only for a designated reviewer by adding their account directly to the users list.

**Combine with field conditions**\
Make the "Severity" field required when Issue Type equals "Incident" AND the user condition is set to "For users" with the "Support" group. The field is only required for support agents creating incidents, not for other users or other work types.
