The Adaptavist Group LogoDocumentation

Workflow Restrictions

Learn how to add, edit, and delete ScriptRunner expression-based rules that control when a workflow transition is available to users.

You define a Jira expression that must be true before users can see or use a transition, so you can hide or block steps unless certain conditions are met (for example, field values, status, or user group). This helps you enforce business rules directly in the workflow editor without writing a full script.

Tip: Terminology updates

Atlassian has updated its workflow terminology as part of the new workflow editor experience. Some names and concepts may differ from what you're used to in the classic editor. For a detailed description of the changes, refer to Atlassian's official workflow documentation.

Supported spaces

Workflow rules are available in company-managed spaces only. Team-managed spaces are not currently supported.

ScriptRunner's workflow rules do not appear as options when you edit a team-managed workflow, so you cannot add them there.

Create an expression-based workflow restriction

You can restrict transitions using Jira expressions:

  1. In Jira Work items settings, go to the Workflows menu.
  2. For your chosen workflow, open the Actions ellipsis (…) and select Edit.
  3. Select the transition you want to add your workflow restriction to.
    The Transition panel displays.
  4. Under Restrict transition, select Add restrict transition rule.
  5. Find and select Restrict using a Jira expression (ScriptRunner).
  6. Enter a Jira expression that must evaluate to true for the transition to succeed.
    Tip: You can start from the workflow restriction examples provided.
  7. Optional: Use the test area to test your expression against a Jira work item.
  8. Select Add.
  9. Select Update workflow to publish your changes.

Edit an expression-based workflow restriction

Use these steps to modify an existing expression‑based workflow restriction:

  1. In Jira Work items settings, go to the Workflows menu.
  2. For your chosen workflow, open the Actions ellipsis (…) and select Edit.
  3. Select the transition with your workflow restriction.
    The Transition panel displays.
  4. In the Rules list, locate the Restrict using a Jira expression (ScriptRunner) rule.
  5. Modify the Jira expression as needed.
  6. Optional: Use the test area to test your expression against a Jira work item.
  7. Select Update to save the rule change.
  8. Select Update workflow to publish your changes.

Delete an expression-based workflow restriction

To remove an expression-based workflow restriction from a transition:

Warning: Deleting an expression-based workflow restriction is permanent. Once you remove it from a transition, you cannot recover or restore it later. If you need the same restriction again, you will have to recreate it.
  1. In Jira Work items settings, go to the Workflows menu.
  2. For your chosen workflow, open the Actions ellipsis (…) and select Edit.
  3. Select the transition that contains your expression-based restriction.
    The Transition panel displays.
  4. In the Rules list, select the Restrict using a Jira expression (ScriptRunner) rule you want to delete.
  5. Open the ellipsis (…) menu and select Delete rule.
  6. Select Update workflow to publish your changes.

Search documentation

Start typing to search the docs.