> 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/execution-order.md).

# Execution order

How Field Rules runs rules in order within a UI Modification and runs several UI Modifications in parallel, with cascading pre-fill examples.

Field Rules applies two layers of execution when a user opens an issue screen: across UIMs and within a single UIM. Understanding how these two layers work helps you structure your rules predictably.

## Two levels of execution

### UIMs run in parallel

When several UI Modifications match the current context - same space, work type and view - they all run at the same time, in no fixed order. This has two consequences:

* A rule can't use a value set by a rule in another UIM, because that rule may not have run yet.
* When rules in different UIMs set the same field's value, name, description or options, there is no predictable winner.

Keep rules that depend on each other, or that modify the same field, in one UIM. Rules inside a UIM run in a fixed order, from top to bottom.

### Rules within a UIM run in sequence

Rules inside a single UIM execute one at a time, from top to bottom. Each rule runs, applies its changes to the working state of the form, and then the next rule runs.

The key insight: each rule sees the state of the form after all previous rules in the same UIM have already applied. A rule later in the list can read values that were set by earlier rules.

## What this enables

### Rules can depend on each other

A "Show field" rule can check whether a value was set by an earlier "Pre-fill field" rule in the same UIM. A "Make field required" rule can use a condition that checks a value set by an earlier "Change field value" rule.

This means you can build multi-step logic within a single UIM, where each rule builds on the result of the previous one.

### Cascading pre-fill

Pre-filling one field and then using its value to drive further pre-fills is a natural pattern with sequential execution. Each step in a chain can check what the previous step produced - and the user sees the fully resolved form state, not intermediate states.

### Deterministic behaviour

Because rules execute in a fixed, administrator-defined order, the outcome is predictable. Rule 3 always runs after rule 2, which always runs after rule 1. A rule applies only when its conditions are met. When several rules set the same property of a field, such as its value or description, the last one that applies wins. Required, locked and visible combine differently, see [Multiple rules on the same field](#multiple-rules-on-the-same-field).

### Multiple rules on the same field

Rules targeting the same field do not cancel each other out. Each rule independently evaluates its conditions and applies its effect when they pass. This means you can have several rules for the same field, each activating under a different condition.

For example: three Pre-fill field rules on the same field, each with a different value and condition. When the conditions of more than one are met, the field gets the value of the last of them, so place the most specific rule last.

| Rule                                 | When the conditions of several rules on the same field are met                                           |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------- |
| Pre-fill field, Change field value   | The value of the last rule whose conditions are met applies                                              |
| Use name, Use description            | The text of the last rule whose conditions are met applies                                               |
| Hide field options, Hide issue types | The options of the last rule whose conditions are met apply, options from earlier rules are not combined |
| Make field required                  | The field is required if the conditions of any rule are met                                              |
| Lock field                           | The field is locked if the conditions of any rule are met, with the description of the last of them      |
| Show field                           | The field is visible only when the conditions of all rules are met                                       |

Show field works the other way round: it hides the field when its conditions are not met, and never shows a field another rule has hidden. A required field is always shown.

Two combinations to avoid:

* **Make field required and Lock field on an empty field.** The user gets a required field they cannot fill in, so the screen can't be submitted. Pre-fill the field, or give the rules conditions that aren't met at the same time.
* **Hide field options before a rule that sets a value on the same field.** A hidden option set by a later Pre-fill field or Change field value rule stays selected. Place Hide field options after those rules.

## Worked example: cascading pre-fill

**Scenario:** A software team wants the create screen to automatically pre-fill a "Service tier" single-select field based on the selected component, then pre-fill the assignee based on the service tier, and show the assignee field only after a tier has been resolved.

{% stepper %}
{% step %}

### Pre-fill field - Service tier

Target: Service tier (single select)\
Value: Critical\
Condition: Component equals "Payments"

When a user opens the create screen with Component set to "Payments", this rule fires and sets Service tier to "Critical".
{% endstep %}

{% step %}

### Pre-fill field - Assignee

Target: Assignee\
Value: Alice\
Condition: Service tier equals "Critical"

This rule runs after rule 1. By the time it evaluates, the Service tier field already contains "Critical" - set by rule 1. The condition passes and Assignee is pre-filled with "Alice".
{% endstep %}

{% step %}

### Show field - Assignee

Target: Assignee\
Condition: Service tier is not empty

By the time this rule runs, Service tier either has the value set by rule 1 or the user's own selection. The Assignee field is shown only when a tier has been set. If no component matched and Service tier was not filled, this rule hides the field.

This chain works only because the three rules share the same UIM and run in the order defined. If they were spread across separate UIMs (which run in parallel), rule 2 would not see the Service tier value set by rule 1.
{% endstep %}
{% endstepper %}

## Re-evaluation on field changes

Rules re-evaluate not just on screen load but also whenever the user changes a field that is watched by at least one precondition.

When this happens, the engine runs through the entire UIM rule sequence again - from rule 1 to the last rule. Rules that were not directly affected by the change still run and re-apply their state. This keeps the form consistent as the user fills it in.

For "Change field value" rules specifically: only direct user input triggers re-evaluation. Changes made by other rules (cascading effects) do not trigger this rule a second time - only the user touching a field does.

## Tips

* **Order rules intentionally.** Rules that establish context - pre-filling values, setting defaults - should come before rules that react to that context. Rules can be reordered within a UIM at any time.
* **Keep dependent rules in the same UIM.** If rule B relies on the effect of rule A, they must be in the same UIM to guarantee that A runs before B.
* **The last applied rule wins on the same field.** If two rules in the same UIM modify the same property of a field, such as its value or description, and the conditions of both are met, the later one applies. Use this deliberately by adding distinct conditions to each rule, or avoid it if the conflict is unintentional. Make field required, Lock field and Show field combine differently, see [Multiple rules on the same field](#multiple-rules-on-the-same-field).
* **Separate independent concerns across UIMs.** Rules that have nothing to do with each other can live in different UIMs without any risk. Parallel execution is fine when there are no dependencies.
