Overview
Scripts can be exported and imported in two formats:
| Format | Best for |
|---|---|
| Single JSON file | Full backups and restores - includes tables, queues, settings and other sections |
| Folder bundle (zip or folder) | Editing scripts in your own editor, keeping them in git, moving them between sites |
REST API access - coming soon. A REST API for keeping JiBrok Studio scripts in a git repository and pushing them in from a CI pipeline is in preparation. It is not part of the current version. Until it is released, scripts move between sites and repositories through Import/Export (the folder bundle is the git-friendly format).
Single JSON file
Export
- On the JiBrok Studio admin page, go to the Admin tab > Export / Import
- Click Export
- Select the sections to include - each section has a switch: every section is on when the dialog opens, which gives a complete snapshot; turn off the ones you do not need (Select All / Deselect All)
- Click Export - the file downloads automatically
A single script or a folder can also be exported as JSON from the Library: Export in the script’s or folder’s action menu. The dialog lets you copy the JSON or download it as a file.
Large exports are fetched in pages, so a progress bar appears while it runs.
Export format
JSON with metadata:
{
"formatVersion": 1,
"exportedAt": "2024-01-15T12:00:00Z",
"scripts": [...]
}
formatVersion is currently 1. Import rejects a file carrying any other value, so
hand-written or converted payloads must keep it at 1.
What’s included for a script
- Source code
- Name, description, enabled status
- Engine (language)
- Actor configuration
- Labels and folder path
- Trigger configurations
- Context (projects, issue types, portals, request types, fields)
- Custom whitelist/blacklist assignment
Version history is not exported - only the current version of each script. Keep Version History in mind as a separate, in-place mechanism.
Import
- Go to the Admin tab > Export / Import
- Click Import
- Paste the JSON or click Upload JSON file, then click Validate
- Choose which sections to import and what to do if an entity already exists (Skip, Overwrite or Copy, see How the merge works)
- Click Import
The import data can be up to 10 MB. Validation checks the JSON format and version, the script count limits and the required fields, and compiles every script, reporting errors and warnings. They do not block the import - if any are found, or validation was not run, you are asked to confirm, and scripts with errors are imported as-is (they may fail when executed).
Run As check
The Run As actor of each imported script is checked against the Run As settings in Admin Settings, the same way as when a script is saved in the Console. A script that runs as the app while Allow ‘Run as: Application’ is off, or as a user while Allow ‘Run as: Specific user’ is off and that user is not in the pre-configured list, is not imported: validation reports it as an error, and the import rejects the batch of scripts that contains it (up to 20 scripts) without writing any of them, so Scripts is listed among the sections that were not imported. Turn on the matching Run As option first, then import again. A script without an actor runs as the current user and is always allowed.
A script whose specific user is an app account, or an account the app cannot find on this site, is refused the same way - only a person’s account can be a Specific user (see Run As), and the whole batch that contains the script is not imported.
Folder bundle
A folder bundle is a directory - or a zip of one - where one file is one script:
studio.json
Utils/Helpers/Sync issues.js
Utils/Helpers/Cleanup.py
Reports/Weekly digest.groovy
- Sub-directories mirror your Library folder tree.
- The file extension sets the language:
.js(JavaScript),.py(Python),.groovy(Groovy),.jexp(Jira Expressions). studio.jsonin the root maps each script’s UUID to its file and metadata.
Because each script is a plain source file, you can edit a bundle in any editor or IDE, keep it in git, and import the folder back afterwards.
studio.json
{
"formatVersion": 1,
"exportedAt": "2026-08-13T10:00:00.000Z",
"scripts": {
"3f2b1c40-9a7e-4c19-8f61-1d0e2b3a4c5d": {
"path": "Utils/Helpers/Sync issues.js",
"name": "Sync issues",
"language": "js",
"enabled": true,
"actor": null,
"description": "Copies fields between linked issues",
"folderPath": "Utils/Helpers",
"labels": ["nightly"],
"context": { "projectIds": ["10000"] },
"triggers": [
{ "triggerType": "scheduled", "config": { "intervals": ["day"] }, "enabled": true }
]
}
}
}
If two scripts in the same folder produce the same file name (for example after
characters a filesystem cannot store are replaced), the second file gets a
numeric suffix: Report.js, Report-2.js. studio.json always records the
real name, so the round trip is lossless.
Export a bundle
- Admin tab > Export / Import > Export as zip - every script in the app.
- Library toolbar > Export as zip - the folder you are currently in.
- Library > folder menu > Export as zip - that folder and everything under it.
The zip is assembled in your browser; nothing leaves your Atlassian site.
Import a bundle
- Open Import folder or zip (Admin tab > Export / Import, or the Library toolbar)
- Choose a
.zip, choose a folder, or drag either onto the drop zone - Review the preview
- Click Apply
The top-level folder of an archive is treated as the bundle root, so a zip made with your operating system’s “Compress folder” command imports the same way the exported zip does.
Preview (dry run)
Nothing is written until you click Apply. The preview shows, per file:
| Column | Meaning |
|---|---|
| Create | The script id is not in the app yet - a new script will be added |
| Update | The script exists and the bundle changes it; the changed fields are listed |
| Unchanged | The script exists and the bundle matches it exactly |
Below the table you also get:
- Problems found in the bundle (a file that is not a script, a duplicate path, an unreadable
studio.json) - Scripts that are in the app but not in the folder. These are only listed - import never deletes anything.
Before Apply becomes available, the same checks the JSON import runs are
applied: every source is compiled, and eval() chains are followed to catch
circular dependencies. In a bundle import, errors block Apply (“Fix the
errors above before applying”); warnings do not.
How the merge works
Import is a merge keyed by script UUID:
- A UUID already in the app - the script is updated in place.
- A UUID that is not - the script is created, keeping that UUID when it is free.
- A script in the app that the bundle does not mention - left alone.
A bundle import always updates a script whose UUID is already in the app in place - the Overwrite rule below. The single JSON file import lets you pick the rule in the If entity already exists drop-down:
| Strategy | Script | Triggers |
|---|---|---|
| Overwrite (Overwrite - replace with imported) | Updated in place | Replaced by the triggers listed in the file: a trigger the file does not list is removed, so importing the same file again never doubles them. A script entry without a triggers field (older exports) leaves the script’s current triggers as they are |
| Skip (Skip - keep existing) | Left exactly as it is: source, triggers, description, enabled state, context, whitelist/blacklist, labels and folder stay unchanged, and no create_script audit entry is written |
Left as they are. The import report counts the script as skipped |
| Copy (Copy - create with ‘(imported)’ suffix) | Existing scripts are not touched; every script in the file is created as a new copy with a new UUID and the name suffix “(imported)” - including scripts whose UUID is not in the app yet | The copy gets the triggers from the file |
Re-importing the same file with Overwrite does not duplicate triggers, so scheduled and event scripts do not start firing twice.
An in-place update writes an entry to the script’s Version history, noted as
Imported, so the state the instance had before the import stays restorable.
Nothing is written when the imported script is identical to the one already
there. This applies to the overwrite strategy; skip and copy never replace an
existing script, so they leave version history untouched.
Keeping UUIDs matters: eval("<uuid>") calls, workflow rule bindings and
automation rules all reference scripts by id. If an id cannot be kept (it is
already taken by a different script), the script is still imported and the
import report lists the old and new id so you can update those references.
A folder without studio.json
A plain directory of source files is a valid bundle. Without a manifest:
- Every file becomes a new script.
- The language comes from the file extension.
- The file name becomes the script name.
- The path relative to the bundle root becomes the folder path.
Missing folders and labels are created automatically on import.
Moving to another site
Exporting from one Jira site and importing on another - dev to production, a customer moving tenants, a restore into a fresh install - is a supported move, but an export is not a full clone of the app. Three things to know before you start: what travels, what stays behind, and what travels but still points at the old site.
Use the single JSON file format for a move. A folder bundle carries scripts only - tables, queues and settings are not in it.
What travels
An export covers 18 sections. You pick them in the export dialog, and again in the import dialog:
| Section | What it holds |
|---|---|
| Scripts | Source, name, description, engine, enabled flag, Run As actor, labels, folder path, triggers, context, whitelist/blacklist assignment |
| Labels | Name, color, description |
| Folders | Full path, color, description |
| Custom Tables | Table definitions - name, columns (type, required, options), context restrictions. Not the rows. |
| Custom Table Data | The rows of every table |
| Message Queues | Queue definitions - name, description, max size, context restrictions. Not the messages. |
| Custom Whitelists | Named API whitelist profiles with their entries (method + pattern) |
| Custom Blacklists | Named API blacklist profiles with their entries |
| Global API Whitelist | The admin and user entry lists, and whether each one is enabled |
| Global API Blacklist | The admin and user entry lists, and whether each one is enabled |
| Trigger Type Settings | Which trigger types are enabled app-wide |
| Event Type Settings | Which Jira event types are enabled |
| Audit Trigger Settings | Which trigger types are written to the execution audit log |
| Run-As Settings | The Application / Pre-configured Users / Specific User switches, and the pre-configured user list |
| Global Variables | The source of the global variables script. An empty script is not exported, so the file carries no Global Variables section |
| Scripted Field Configurations | Script assignments per field and per field context |
| Admin Settings | Service project configuration, issue tracking on/off, issue tracking sync hour |
| Sync Configurations | Two-project sync recipes - projects, filters, field rules, value and status maps, issue-type maps, triggers, JSM and sanitization settings. User references are left out (see below). |
What stays behind
Nothing below is part of an export, so the new site starts empty on all of it:
| Not exported | Notes |
|---|---|
| Version history | Only the current version of each script is exported |
| Run history | Logs, results and timings of past runs |
| Audit log | Both the execution audit and the admin action audit. The import writes fresh entries on the new site for the scripts, tables and queues it creates. |
| Web-trigger tokens | See the note below - tokens have to be re-issued |
| Pending queue messages | Queue definitions travel, the messages waiting in them do not |
| Scenario runs | Scenario run state and step results |
| Compliance baselines and drift results | Take a new baseline after the move |
| Error monitoring counters | Per-script error counts and notification state |
Web-trigger tokens are stored encrypted with an AES-256-GCM key that is generated per installation and kept in that installation’s secret storage. The new install has its own key, so a copied token could not be decrypted there even if it were carried over. After the move, issue a new token for every web-trigger script and update whatever calls it - see Webhook token management.
Ids that still point at the old site
Project, issue type, portal, request type and field ids are per site. These fields are exported as-is, so after an import they hold ids that mean nothing - or something else - on the new site:
| Where | What it holds | Where to fix it |
|---|---|---|
| Script context | projectIds, issueTypeIds, portalIds, requestTypeIds, fieldIds |
Console > Config tab > Context |
| Custom table and message queue context | Project and issue type ids | Tables tab / Queues tab, in the table or queue settings |
| Scripted field configurations | Custom field id and field context id. The script itself is matched by name, so a renamed script is reported as not found. | Jira Settings > Issues > Custom Fields, in the field’s configuration |
| Admin settings > service project | Project id and key, component id, assignee account id | Admin tab > Service Project |
| Script Run As actor | The account id of the Run As user | Console > Run as selector above the editor |
Import validation checks only the shape of these ids (numeric, within the count limits), never whether they exist on the target site - so an import with stale ids reports no error at all. The mismatch surfaces at run time instead:
- A context listing a project id that does not exist on the new site matches no issue, and the script silently never runs.
- Worse, that same numeric id may belong to a different project on the new site - then the script does run, against the wrong project.
Review the context of every script, table and queue after the import.
Sync configurations
Sync configurations are the one section that does not carry account ids at all.
An Atlassian account id means one person on one site; on another site it means
somebody else, or nobody. So the export blanks every user slot and lists it
under userRefs on the configuration:
| Slot | What it was |
|---|---|
comments.botUserAccountId |
The user comments are posted as |
jsm.botUserAccountId |
The JSM technical user |
jsm.customerAccountId |
The customer used when the policy is “selected” |
fields[n].defaultValue |
Any { accountId } value inside a field rule’s default |
The account id of the original user stays in the file for reference only - the import never re-applies it. The import report says how many references are waiting; open each configuration in Recipes and pick the users on this site.
Every imported configuration arrives disabled, whatever the file says. A sync config names issue types, request types and users by site-scoped id, and a run against a stale mapping creates real issues that then have to be cleaned up by hand. Review the mappings first, then enable each configuration yourself.
Unlike the other sections, the sync import does check the target site before it writes anything:
- Both project keys must exist here. A missing project is an error and the whole file is rejected - nothing is created.
- Field ids referenced by field rules should exist here. A missing field is a
warning; at run time the rule’s
onMissingFieldpolicy decides what happens.
What it does not check is the ids inside the maps - issueTypeMap,
jsm.requestTypeMap, jsm.slaSourceFieldId / slaSnapshotFieldId. Those are
per-site like every other id in the table above, so re-open the issue-type and
JSM mapping steps of each imported configuration before you enable it.
The export and import buttons for this section sit on the Recipes tab, above the configuration list: Export all, Import, and Export in each row’s action menu. Import asks what to do when a name already exists - skip, overwrite or rename. See Two-project sync - Export and import.
Transfer steps
- On the old site: Admin tab > Export / Import > Export, leave all sections selected, save the file.
- On the new site: install the app, then open Admin tab > Export / Import > Import. If scripts run as the app or as specific users, first import only the Run-As Settings section (or turn the options on in Admin Settings): the import applies the settings after the scripts, and a script whose actor the current settings do not allow is not imported (see Run As check).
- Paste or upload the file and click Validate. Fix the reported errors before continuing - the import does not stop you, but scripts with errors are imported as-is.
- Pick the sections and the conflict strategy, then click Import.
- Re-point the contexts and configurations listed above at the new site’s ids.
- Issue new web-trigger tokens and update their callers.
- Re-check the Run As users, the service project and the global whitelist/blacklist.
The import applies the sections in a fixed order: labels and folders first, then custom whitelists and blacklists, then scripts, then custom tables, message queues and table data, then the global API lists and the trigger, event, audit and Run-As settings, then global variables, then scripted field configurations, and admin settings last. The order is not arbitrary - scripts reference folders, labels and access profiles by name, and scripted field configurations reference scripts by name, so each phase needs the one before it. If you split the move into several passes, import in that same order.
Import is a merge, never a replace: nothing on the new site is deleted and
script UUIDs are kept where they are free - see
How the merge works. One exception worth knowing: the
Copy conflict strategy imports every script as a new copy with a new UUID, which breaks eval("<uuid>") calls and workflow rule bindings.
Limits
| Limit | Value |
|---|---|
| Import data size (single JSON file) | 10 MB |
| Scripts per import batch | 20 (a Run As rejection rejects the whole batch) |
See Limits for script count limits.
Next steps
- Script Library - Managing scripts
- Limits - All system limits
- Administration - Admin tab overview
