- Overview
- Code editor
- Autocomplete
- Running scripts
- Output and results
- Sandbox mode
- Run As (execution identity)
- Issue key context
- Syntax check
- Saving scripts
- Script engine reference
- Console tabs
- Variables popup
- Deep linking
- Local draft
- Studio Log panel (issue context)
- Next steps
Overview
Use the Console to write and run scripts interactively. It provides a code editor with syntax highlighting, execution controls, output display, and configuration options. The Console is the Console tab of the Script Console page, which you open from the Jira Apps menu.

</a>

</a>
Code editor
The editor supports:
- Syntax highlighting for the scripting language
- Script engine selection - choose between JavaScript (primary), Python, Groovy and Jira Expressions with the Engine setting on the Config tab > General. Jira Expressions are what the Workflow Condition trigger evaluates
- Variables popup - insert available variable names into the editor (see Variables popup)
- Local draft auto-save - drafts are saved to browser localStorage automatically (see Local draft)
- Help - opens the language reference for the selected engine (see Script engine reference)
The toolbar below the editor also has:
- New - clear the editor and start a new, unsaved script (asks for confirmation if there are unsaved changes)
- From Template - pick a ready-made template; the engine switches to the template’s language
- Discard changes - shown when an open saved script has unsaved edits; reverts to the saved version
On a narrow screen (for example a 1024 px wide window) the toolbar buttons wrap onto a second line instead of being cut off, so every button stays fully visible. Clicking into the editor, inserting a variable or picking an autocomplete suggestion does not scroll the page - the Console tabs stay in view.
When a saved script is open, its name is shown above the editor - click it to rename the script.

</a>
Autocomplete
The editor provides context-aware autocomplete that works with all script engines (JavaScript, Python, Groovy):
- On-type suggestions - completions appear as you type, or press Ctrl+Space to trigger manually
- Dot completion - type
issue.to see available properties and methods for that object - Signature help - parameter hints appear when calling functions (e.g.,
Issues.search(shows expected arguments) - Return type awareness - the editor knows return types of API calls, so
Issues.get("PROJ-123").suggests RichIssue methods - Engine-specific - completions match the selected script engine (JavaScript, Python, Groovy or Jira Expressions), showing Python builtins/modules, Groovy classes/GDK methods, or JavaScript APIs accordingly
- Inline documentation - method descriptions and parameter types are shown in the completion popup
- Your data - names of your custom tables, message queues and scripts inside the string argument that takes them (
tables.get(",queue.push(",eval("), plus your global variable keys in the general list - Config keys - keys of the
batch()config object (jql,keys,source,fields,expand,batchSize, …)
How it works
- Type a dot (
.) after an object to see its available methods and properties - Type inside a function call to see parameter hints
- Start typing to filter completions by name
- Use the arrow keys to navigate and Enter/Tab to insert
The completion engine analyzes the cursor context - it resolves call chains (for example, await Issues.search(...). knows the result type) and provides relevant suggestions.
Installation data (tables, queues, scripts, global variable keys) is loaded once when the Console opens. Picking a script inside eval("...") inserts its id, while the list shows the script name. If that data cannot be loaded, the editor keeps offering the built-in API completions.
Running scripts
Click the Run button to execute the current script. During execution:
- The Run button shows a loading state (“Running…”)
- The Output tab shows “Executing script…” until the run finishes - only scenario runs stream their step progress while they execute
- Logs and the result are displayed when execution completes
- Errors are shown with descriptive messages, the line number and the source line
An error the script throws and does not catch is shown the way JavaScript prints it:
| Thrown value | Shown as |
|---|---|
| An error object | <name>: <message> - throw new Error("x") gives Error: x, throw new TypeError("bad input") gives TypeError: bad input; a class extending Error shows its own name |
| An error object with an empty message | Only its name, for example Error |
| A string | The string as is |
| Any other value | JSON |
Run History and the Error Monitor keep the same text.
Scripts that use scenario functions (step(), loop(), batch()) must be saved before they can be run - the Run button stays disabled while there are unsaved changes.
Keyboard shortcuts
Press Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux) to run scripts quickly without clicking the button.
Output and results
Log output
Scripts produce output through logging functions:
| Function | Level | Use for |
|---|---|---|
log() / print() |
log | General output |
debug() |
debug | Verbose debugging |
info() |
info | Status updates |
warn() |
warn | Warnings |
error() |
error | Error messages |
Each level has distinct styling in the output panel. Multiple arguments are joined with a space. The log section header shows the number of entries (Logs (N)).

</a>
Script result
The result field shows either:
- The value of the last expression (implicit return)
- The value passed to
return(explicit return)
Complex objects can be shown in a Tree view or Compact form. A result that is an Atlassian Document Format (ADF) document can also be shown rendered (ADF document view).
Files created with createFile() are listed in a Files section with a Download button for each.
Execution metadata
After each run, the result header shows:
- Status and duration - “Success - N ms” or “Error - N ms”
- Sandbox banner - when sandbox mode was active, the number of simulated requests
If the issue you entered does not match the script’s configured context (projects, issue types), the script is skipped and the Output tab says so.
Sandbox mode
Toggle Sandbox (next to the toolbar buttons) to simulate write operations without modifying Jira data.
When sandbox mode is active:
- Read operations (GET requests) execute normally
- Write operations (POST, PUT, DELETE) are simulated
- A banner shows the count of simulated requests (“Sandbox mode - N request(s) simulated”)
- Script output still reflects the simulated results
This is useful for testing bulk update scripts before running them for real, verifying script logic without side effects, and debugging write operations safely.
The Sandbox toggle is not shown for the Jira Expressions engine.

</a>
Run As (execution identity)
The Run as selector controls which identity the script uses when making Jira API calls.
| Mode | Description |
|---|---|
| Current user | Script runs with your permissions (default) |
| Application | Script runs with app-level permissions (if enabled by admin) |
| Pre-configured user | Select from admin-defined user list (if enabled by admin) |
| Specific user | Search for any Jira user (if enabled by admin) |

</a>
Note: Available modes are controlled by the site administrator in Administration. If a mode is disabled after being selected, a warning is shown.
The Run as choice belongs to the script. The selector above the editor and the Run as selector on the Context sub-tab of Config show and change the same value: a change in either one marks the script as changed and is saved with Save.
Specific user takes a person’s account only: app accounts, including the accounts of this app’s own installations, are not offered. Jira Service Management customer accounts are refused as well: saving or importing such a script fails, as for app accounts. To run a script as the app, use Application (if enabled by admin). Saving a script whose specific user is an app account, or an account the app cannot find, is refused; importing such a script refuses the whole import (see Import & Export).
Some triggers restrict the choice:
- Scripts with a UI Modification (UIM) trigger can only run as the current user.
- A schedule has no current user: if a script with a scheduled trigger is set to Current user, its scheduled runs execute as the Application. A warning is shown; pick an explicit actor if the script needs a specific user’s permissions.
- Scripts with a JQL Function trigger cannot run as the current user.
Issue key context
The Issue field (e.g., PROJECT-123) provides context to your script:
- The
issueKeyvariable is set to the entered value - API namespaces that support issue context use it
- The
issuevariable is automatically initialized with the issue data (fields, status, summary, etc.) - Leave empty if your script doesn’t need issue context
// Both issueKey and issue are available when an issue key is entered
log("Working with:", issueKey)
log("Summary:", issue.summary)
log("Status:", issue.status)
// or load the full issue explicitly
const loaded = await Issues.get(issueKey)
Syntax check
Click the Check button to validate your script without executing it. This catches:
- Syntax errors (missing brackets, invalid tokens), with the line number
- Script complexity (AST node limit) violations
- Input size violations
- Circular
eval()dependencies between scripts
On success, Check also lists:
- Included scripts - scripts the source calls through
eval()(and warns about missing ones) - Ambiguous field names - field names that match more than one Jira field
- Trigger parameters - which trigger parameters the script uses, and any that no trigger declares
Check is faster than Run because it only parses the script without executing it. For Jira Expressions, Check validates the expression with Jira.
Saving scripts
Click the Save button to save the script to the Library. If the script has unsaved changes, the Save button is highlighted. Settings are taken from the Config tab:
- Script Name (required - Save is refused and the Config tab opens if it is empty)
- Description
- Folder location
- Labels for organization
- Triggers for scheduled and event-based execution
Saved scripts appear in the Script Library and can be accessed from any session.
Switching from the Console tab to another tab, or opening another script, while there are unsaved changes asks for confirmation in the Unsaved changes window: Discard drops the edits, Cancel keeps you in the editor.
New scripts
When saving a new script without a name, the Config tab opens so you can set one first.
A name, description or Run As choice entered in the Config tab stays in the form until you save or discard it, also for a new script that has not been saved yet - the Config tab re-reading its data does not clear it.
The first save of a new script keeps you where you were: the tab you had open on the right (for example Config) stays open and the form keeps what you entered, while the Run History and Version History tabs appear next to it.
Existing scripts
The save dialog asks for an optional version note (up to 2,000 characters) describing the changes. It is stored with the new version in the Version History. An issue key mentioned in the note links the script to that issue (see Issue Panel).

</a>
Validation on save
Before saving, the script is automatically checked for syntax errors. If issues are found, a warning is shown - you can still save the script, but it may not execute correctly. A warning is also shown if the script is disabled.
Script engine reference
Click the Help button in the toolbar to open the Script Engine Reference - a built-in, searchable reference panel with examples for all script engines.
See Script Engine Reference for a detailed overview of all categories and engine-specific content.
Console tabs
The Console has four tabs next to the editor: Output, Run History, Version History, and Config. Run History and Version History appear only when a saved script is open.
The tab labels are always shown in full, also on narrow screens (1024 px and below): the right panel keeps enough width for all four tabs, and if it is still too narrow, the tabs wrap onto a second row instead of being cut off.
When the console is narrow (a Jira window of about 1024 px and below), the editor and the right panel stand in one column at full width: first the editor with its fields and buttons, then the Output and the other tabs below it, so the editor is never squeezed into a thin column.
Output
Shows the execution output - result, errors, files and log messages. Cleared on each new run.
Run history
Persistent execution history of the open script (the last 10 runs). Each entry shows:
- Time
- Trigger - a run started from the Console is recorded as a console (manual) run, alongside scheduled, event, and the other trigger types
- Status (success/error)
- Duration
Expand an entry to see its result, logs, trigger context, input parameters and the script version that ran.
Run History does not show the issue key a run was bound to. To trace what happened on a specific issue, use the Studio Log panel on the issue itself.

</a>
Version history
All saved versions of the current script:
- Date and author
- Description (version note)
- View the source and settings of a version
- Compare any two versions, including the current one
- Restore a previous version (up to 50 versions; restoring creates a new version entry)
See Version History for details.
Config
Script metadata and configuration, in three sub-tabs:
- General - Name, Description, Enabled, Engine, Labels, Folder, Issue Links
- Context - context restrictions (projects, issue types, service desk portals, request types, fields), Run as and API restrictions (API Whitelist / API Blacklist profiles)
- Triggers - trigger configuration
The execution identity (Run as) is set with the selector above the editor or on the Context sub-tab; both edit the same value, see Run As.

</a>

</a>
Variables popup
The Variables button in the editor toolbar opens a popup showing all available variables grouped by section:

</a>
| Section | Description | Examples |
|---|---|---|
| Trigger Variables | Variables injected based on configured triggers | event (event and other event-style triggers), event.webhook (web triggers), uim/uimData (UIM triggers), params |
| Global Variables | Variables from the global variables script | Loaded dynamically from server |
| Runtime | Core runtime variables and API objects | context, issue, issueKey, currentUser, requestJira, Jira, queue, tables, asyncEvent |
| Scenarios | Scenario functions | step, loop, batch, next, progress, emit |
| Script API | High-level API namespaces | Issues, Users, Projects, Fields, Components, Versions, Boards, Sprints |
| Utilities | Helper namespaces | Adf, DateUtils, Arrays, Strings, CSV, Validator |
| Admin API | Jira configuration namespaces | IssueTypes, Statuses, Workflows, Screens |
- Trigger Variables depend on the script’s triggers. For example,
eventappears if the script has an event trigger;uimanduimDataappear for UIM triggers.params(trigger parameters) is always listed - Global Variables are fetched dynamically when the popup opens and shown only if keys exist
- For the Jira Expressions engine the popup shows the expression context variables, issue properties and type constructors instead
- Clicking a variable inserts its name at the cursor position
- Each variable shows a tooltip with a brief description
Deep linking
The Console supports deep linking - the URL updates as you navigate:
- Opening a script updates the URL with the script ID
- Sharing URLs - copy the URL from the browser to share a direct link to a specific script
- Copy link - the Copy link action in a script’s menu in the Script Library copies a shareable URL
- Browser Back / Forward move between the scripts and folders you opened
Deep links open the Console with the specified script loaded. This works across sessions and devices.
Local draft
When working in draft mode (no saved script open), the Console automatically saves your work to the browser’s localStorage.
Saved fields:
- Script source code (debounced 500ms)
- Issue key
- Actor (Run As setting)
- Sandbox mode toggle
- Script engine language
Behavior:
- Restored automatically when you return to the Console
- Cleared when you save the script to the Library or click New
- Not synchronized between devices or browsers - each browser/device has its own draft
- If localStorage is unavailable (e.g., in a sandboxed iframe), the feature degrades gracefully - no errors, just no persistence
Studio Log panel (issue context)
Jira administrators see a Studio Log panel on the Jira issue view that shows which scripts ran on the issue and which scripts are linked to it - no need to open the Console and search run history manually. See Issue Panel for what it shows, what is recorded, and how scripts get linked to issues.
Next steps
- Script Library - Manage saved scripts
- Issue Panel - Script activity on a Jira issue
- Triggers - Automate script execution
- Administration - Configure Run As modes and security
- Scripting Language - Language reference
- Script Engine Reference - Built-in reference panel
