Forge receives the transition
Mercury checks the app license and parses Jira's event into a stable script context.
Mercury
JavaScript automation for Jira Cloud
Mercury runs your JavaScript after a Jira transition. Scripts execute in an isolated backend runtime with a small, permission-checked Jira API.
Workflow post-functions support all eight checked Jira helpers.
const current = await jira.getIssue(issue.key);
const status = current.fields.status.name;
const summary = current.fields.summary;
await jira.updateIssue(issue.key, {
fields: {
summary: `[${status}] ${summary}`
}
});
console.log("summary updated", issue.key);
Get started
Add Mercury to a workflow transition, write your script, and test it with sample issue data.
Edit a company-managed or team-managed workflow. Select the transition that needs automation.
Add the Mercury post-function and write JavaScript with the documented context and helpers.
Run a simulation and inspect the proposed Jira updates before saving the rule.
Runtime model
The editor sends source to a Forge function. A fresh QuickJS runtime compiles and runs it. The script receives JSON data and named Jira helpers, never Forge credentials or Node.js globals.
Mercury checks the app license and parses Jira's event into a stable script context.
Each run gets its own memory and time limits. Host globals such as process, require, and fetch are absent.
Every Jira call crosses a checked backend boundary. Scripts cannot make arbitrary network requests.
Bounded console output and a structured result make failures diagnosable without exposing credentials.
Script reference
Select a helper to inspect its implemented contract and copy an example. Workflow scripts and workbench scripts use the same API.
issueThe transitioned issue with id, key, and the fields Jira supplied.
transitionThe transition ID plus normalized from and to statuses.
actorThe initiating account ID when Jira includes one. The value can be null.
consoleBounded log, warn, and error methods.
Examples
This local example runner does not execute code or contact Jira. It demonstrates how the documented update payload changes.
jira.updateIssue callAutomation workbench
Jira administrators can open eight connected views. The backend checks Jira administrator permission for every action.
In simulation, search accepts only project = DEMO or key = DEMO-n. Sample transitions are 11 To Do, 31 In Progress, and 41 Done.
Mercury consumes the confirmation and creates the running history record in one atomic operation. Live console runs use the Mercury app identity.
An automation stays pinned to that revision. Archiving a script prevents new enables, but it does not disable automations that already use the revision.
Open History, then select Refresh to load runs completed since the page opened. Inspect the origin, issue, start time, duration, Jira call count, and fixed failure code. Guest console values are not retained.
A run left as running after a crash has an uncertain outcome. Mercury does not retry it automatically. If only final history storage fails, the console still returns the actual script result and live logs with a finalization-failed warning.
Intervals use UTC epoch buckets rather than a wall-clock appointment.
Privacy controls
Mercury tracks the author automatically. Administrators declare account IDs for other people named in retained source, names, and settings.
An empty declaration means the administrator reviewed the authored content and asserts that it contains no other person’s personal data. Erasure can remove shared scripts and dependent automations. Exported copies remain the administrator’s responsibility. Read the Cloud privacy notice.
Safe operations
Mercury gives Jira administrators a read-only path for real issue data, installation controls, recent health, and portable configuration.
Choose one issue and run with app-authorized real Jira reads. Mercury returns proposed writes without sending them. Retained history excludes proposed writes and Jira response values. A dry run cannot prove Jira would accept those writes.
Mercury admits at most 100 runs per UTC hour and 10,000 per UTC month. Sample simulations count. Administrators can lower those limits or pause new runs. In-flight runs continue.
Health shows the latest success or failure for workflows and automations, including failures that happen before a normal history record starts.
Export current source and older snapshots pinned by automations, with up to 25 definitions. The bundle emits definitions disabled. Import creates standalone scripts and automations with new local IDs.
Automation delivery
Mercury uses loop protection and records an auditable result without automatically replaying failed work.
An installation can store up to 25 listener and scheduled-job definitions. Up to five can be enabled at once.
Mercury deduplicates each automation and event or schedule bucket for 30 days. Editing or toggling it does not clear that claim.
Listeners skip events marked selfGenerated or carrying a Mercury trace value.
Jira may accept some writes before a failure. Mercury records the failure and does not promise exactly-once effects.
Created events use the Jira issue ID. Updated events require both the issue ID and a changelog ID. Mercury skips an updated event when that stable identity is missing. It also drops an event whose timestamp is more than 24 hours from receipt.
One coarse hourly Forge trigger checks enabled jobs. A job uses a 1, 24, or 168-hour UTC epoch bucket. The first trigger after enablement can run the job. Missed intervals coalesce into the current bucket.
The claim uses the automation ID and bucket identity. Editing, disabling, or re-enabling a job does not run the same claimed bucket again.
Mercury prevents known duplicate dispatches for 30 days. It does not provide exactly-once Jira writes. It does not retry failed runs automatically. Scripts can leave partial Jira writes when a later helper call fails.
Cloud pricing
Marketplace billing uses the number of billable Jira users, not the number of Mercury administrators. Up to 10 users costs $10 per month. From 11 users, the progressive schedule counts every user.
| Users | Rate per user |
|---|---|
| Up to 10 | $10 flat |
| 1–100 | $1.00 |
| 101–250 | $0.90 |
| 251–1,000 | $0.75 |
| 1,001–2,500 | $0.60 |
| 2,501–5,000 | $0.50 |
| 5,001–7,500 | $0.45 |
| 7,501–10,000 | $0.40 |
| 10,001–25,000 | $0.30 |
| 25,001–50,000 | $0.25 |
| 50,001–100,000 | $0.20 |
Single-instance and multi-instance customers use the same rates. Annual Marketplace pricing is 10 times the monthly price at the annual tier ceiling. Multi-instance customers use annual billing.
Each installation can admit up to 100 runs per UTC hour and 10,000 runs per UTC month. These execution limits do not vary by seat count.
Open Atlassian Marketplace for the exact annual quote and applicable tax →Cloud features
Server to Cloud
Mercury Server scripts run inside Jira's JVM. Mercury Cloud scripts use JavaScript and checked Jira helpers inside Forge.
| Concern | Mercury Server | Mercury Cloud |
|---|---|---|
| Language | Groovy | JavaScript |
| Runtime | Inside Jira's JVM | Isolated QuickJS on Forge |
| Jira access | Jira Java classes | Named asynchronous helpers |
| Files and network | Depends on server access | No guest filesystem or arbitrary network access |
| Failure behavior | Depends on Jira Server transaction context | Completed Jira updates cannot be rolled back |
issue.setFixVersions([
versionManager.getVersion(
issue.projectObject.id,
'NEXTBUILD'
)
])const versionId = "10014";
await jira.updateIssue(issue.key, {
fields: {
fixVersions: [{ id: versionId }]
}
});