Workflow Rules

Use ScriptRunner Workflow rules to enhance and automate your workflows beyond Jira's native capabilities. They enable you to create rules related to the transition of a work item's status within Jira, giving you finer control over what can move, when, and under which conditions. You can enforce business rules, automate side effects, and keep data clean and consistent as work items progress through their lifecycle.

You can extend Jira’s native workflows with ScriptRunner by adding powerful automation and guardrails around transitions:

  • Scripted workflow actions: Run an automation after a work item transitions to a new status. For example, you can create actions that:
    • Auto‑assign the work item to the last user in a specific role
    • Send a Slack notification to key stakeholders
    • Create and link a follow‑up task for the next stage of work
  • Scripted or expression-based workflow validators: Enforce rules when a user attempts a transition. For example, you can create validators that:
    • Require a Fix Version when resolving a work item
    • Require a comment when rejecting or closing a work item
    • Ensure all subtasks are in a Done status before allowing the parent to be closed
  • Expression-based workflow restrictions: Control when a transition is available. For example, you can create restrictions that:
    • Only show the transition to specific user groups
    • Only show the transition when the priority is High
    • Only show the transition when an assignee is set

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.

Scripted workflow rules (actions and validators)

Create scripted actions and validators in ScriptRunner when you need more advanced or custom logic than Jira's built‑in options allow.

  • Use scripted actions to run scripts after a transition completes.

  • Use scripted validators to implement complex checks that depend on multiple fields or related work items.

Once created in ScriptRunner, you simply select your script when configuring the transition's action or validator in Jira.

Expression-based workflow rules (restrictions and validators)

For lighter-weight, inline logic, you can use Jira expression–based ScriptRunner rules directly in the workflow editor, similar to native Jira conditions and validators.

  • Use expression-based restrictions to control when transitions are available based on Jira expressions.

  • Use expression-based validators to ensure a rule is met at transition time without writing a full script.

These expression-based rules are configured directly in Jira's workflow UI, giving you a quick way to add checks and restrictions while still leveraging ScriptRunner.

On this page