Triggers

Overview

Automate script execution by attaching triggers to schedules, events, or user actions. Configure triggers in the Triggers section of the script’s Config tab.

Not sure which trigger to use? See Choose the right trigger for a side-by-side comparison of all 12 types.

Trigger types at a glance

Trigger Type Covered in detail
Scheduled (every 5 minutes/hourly/daily/weekly, optionally once per issue by JQL) Scheduled Triggers
Event (32 Jira events) Event Triggers
Async Event Async Events
UI Modification (issue create and portal request create forms, onInit/onChange) UI Modifications
Scripted Field (Text/Number/Date/DateTime/Paragraph/User/User List/Group/Group List) Scripted Fields
Automation (Run Script and Run Script (List) actions) Jira Automation Integration
Rovo Agent Rovo AI Agent Integration
Workflow Post Function Workflow Post Function
Workflow Validator Workflow Validator
Workflow Condition Workflow Condition
Webhook (HTTP) Webhook Trigger
Custom JQL Function (issue in jbExec(...)) JQL Functions

Run as and limits at a glance

Every trigger type is a singleton per script. The limits below are per run.

Trigger type Runs as Execution time API calls Pending promises
Scheduled Configured actor; Current user runs with application permissions (a schedule has no user) 55s 100 -
Event Configured actor; Current user = the user who caused the event (application permissions when the event carries no user) 25s 60 -
UI Modification Always the current user 5s 20 20
Scripted Field (all nine types) Always Application 5s 20 20
Async Event Configured actor; Current user runs with application permissions 55s 250 -
Automation Configured actor; Current user runs with application permissions 40s 80 -
Rovo Agent Configured actor; Current user = the user talking to Rovo 40s 80 -
Workflow Post Function Configured actor; Current user = the user who performed the transition 15s 40 30
Workflow Validator Configured actor; Current user = the user who performed the transition 10s 20 20
Workflow Condition Evaluated natively by Jira (no sandbox) No engine limits - -
Web Trigger Configured actor; Current user runs with application permissions 50s 100 50
JQL Function Application or a specific user (Current user is rejected) 22s 60 -

See Limits for the full set of per-trigger limits.


Context restrictions

Scripts can be limited to specific projects and issue types. When restricted, scripts skip non-matching issues.

For UI Modification triggers, the scope is configured on the script’s Context tab: projects and issue types, JSM service desks (portals) and request types, and the fields to monitor. See Limits for context restriction limits.

Configure context restrictions in the script’s Config tab.


Trigger parameters

Triggers can define fixed parameters that are accessible in the script via the params object. This lets one script behave differently per trigger without editing its source.

Defining parameters

In the Add/Edit Trigger dialog, use the Parameters section (Add parameter) to define name/value pairs:

Field Description
Parameter name Used as params.name in the script. Must be a valid identifier (letters, digits, _, $, not starting with a digit), up to 50 characters, unique within the trigger, and not a reserved name such as issue or event
Value Text value, up to 2,000 characters. Values are always strings

Up to 20 parameters per trigger.

Supported trigger types

Parameters reach the script for: Scheduled, Event, Custom Field (scripted fields), Async Event, Automation, Rovo, Workflow Post Function, Workflow Validator and Web Trigger. They are not passed to UI Modification and JQL Function scripts, and a Workflow Condition runs no script.

The Automation action also adds params.actionInput - the Action Input value entered in the rule (smart values resolved). See Jira Automation Integration.

Using parameters in scripts

// Access a parameter
const targetProject = params.projectKey
const maxItems = Number(params.limit || 100)  // values are strings

// Check a flag
if (params.dryRun === "true") {
  log('Running in dry-run mode')
}

Parameters are read-only and frozen - they cannot be modified at runtime. A scenario started by a trigger sees the same params in every step.


Managing triggers

Adding a trigger

  1. Open a script in the Console
  2. Go to the Config tab, Triggers section
  3. Click Add Trigger
  4. Select trigger type and configure settings
  5. Save the script

A script can have up to 10 triggers.

Triggers tab empty state

</a>

Add Trigger dialog with trigger type options

</a>

Add Trigger dialog showing Rovo option

</a>

Enabling/disabling

Each trigger has its own enabled/disabled toggle, independent of the script’s enabled status. Both must be enabled for the trigger to fire.

One trigger per type

Every trigger type is a singleton: at most one trigger of each type per script (Scheduled, Event, UI Modification, each Custom Field type, Async Event, Automation, Rovo, Workflow Post Function, Workflow Validator, Workflow Condition, Web Trigger, JQL Function). Several different types can be combined on one script - except Workflow Condition, which cannot be combined with any other trigger type.

Important notes

  • Workflow Condition is exclusive - adding a Workflow Condition trigger removes all other triggers from the script. This trigger uses Jira Expressions (not the sandbox engine) and is incompatible with other trigger types. See Workflow Condition.
  • Workflow Validator is fail-open - if a validator script throws an error or times out, the transition is allowed (not blocked). Design validators to explicitly return false with a message to block transitions. See Workflow Validator.

Global trigger controls

Site administrators can enable or disable entire trigger types in Administration (Admin Panel -> Admin -> Triggers). Disabled types preserve configuration but prevent execution. UI Modification, Rovo and Web Trigger are disabled by default; all other types are enabled by default. Individual Jira event types can also be switched off site-wide in Admin Panel -> Admin -> Event Types.

See Limits for trigger count limits.


Next steps


JiBrok Studio for Jira Cloud JiBrok Studio for Jira Cloud
Release notes
Core Features
Triggers
Extensions
Data Storage
Scripting Overview
JavaScript Engine
Python Engine
Groovy Engine
Scripting API
Administration
Guides