Jira workflow validator scripts for Cloud

Stop bad transitions before they happen. Run a script every time an issue is about to transition - block invalid moves, enforce policy, and return a custom error message to the user, all from a Forge-native runtime inside Atlassian's cloud.

What a workflow validator script gives you

Built-in Jira workflow validators cover the basics - "field is set", "user is in role" - but they cannot express anything that depends on dynamic data: cross-issue checks, computed thresholds, lookups in your own tables, or policy that changes by project and customer.

A workflow validator script runs before the transition is applied. If your script blocks the transition, the issue stays in its current status and the user sees the error message your script returned. If it allows the transition, the issue moves and any post-functions run.

This is one of the most common reasons teams adopt scripting on Jira. For years, the workhorse pattern lived inside legacy Connect-based scripting apps. With Atlassian Connect reaching full end of support on 31 January 2027, those validators have to move to a Forge-native runtime - and that move is also an opportunity to remove an external vendor backend from the trust boundary.

Three common validator scenarios

1. Block "Done" with open subtasks

An issue cannot transition to Done while any of its subtasks are still open. Return a precise message naming the offending subtask keys.

2. Approval required > threshold

Transitions of "Change Request" issues to Approved require a CAB approval field to be populated when the impact field is "High" or "Critical".

3. Cross-project dependency check

An Engineering story cannot move to Ready for release until every linked QA ticket is resolved - even across projects.

How JiBrok Studio delivers it

Full transition context

  • issue - the issue being transitioned, auto-loaded
  • event.transition - source and target status
  • event.modifiedFields - fields changed in the same transition
  • currentUser - who initiated the transition

Block or allow based on any of them, with a custom error message returned to the user.

Companion workflow triggers

All three live in the same Script Library, share the same Scripting API, and run on the same Forge runtime.

Workflow Validators are available in company-managed projects.

A small example

Block Done if any subtask is still open.

// Workflow Validator: 'issue' is auto-loaded by the platform
const subtasks = issue.fields.subtasks || [];

const open = [];
for (const sub of subtasks) {
  const child = Issues.get(sub.key,
    { fields: ['status'] });
  if (child.fields.status.statusCategory.key !== 'done') {
    open.push(child.key);
  }
}

if (open.length > 0) {
  // Blocking is done by the return value, never by throwing:
  // a script error is treated as "allow" (fail-open)
  return {
    valid: false,
    errorMessage: 'Cannot mark Done while these subtasks are open: '
      + open.join(', ')
  };
}

return { valid: true };

Attach the script to a Workflow Validator trigger, then add the Run Script - JiBrok Studio validator to the target transition. The errorMessage you return is shown to the user when the transition is blocked.

Validators are fail-open by design: if the script itself fails - runtime error, timeout, or an inactive license - the transition is allowed, so a broken script never freezes a workflow. Always block explicitly with return { valid: false }; never rely on throw.

Validate transitions without external services

JiBrok Studio's validators run on Atlassian Forge - no vendor server in the path, no third-party data egress.

JiBrok Studio for Jira Cloud JiBrok Studio for Jira Cloud
JiBrok Message Field for Jira Cloud Message Field for Jira Cloud
JiBrok time in status Time in status for Jira Cloud
JiBrok time in status Time in Status (Forge) for Jira Cloud
Calculated Fields (Forge) Calculated Fields (Forge) for Jira Cloud
JiBrok Calculated fields Calculated fields (JBCF) for Jira Cloud
JiBrok Timer Timer field | SLA for Jira Cloud
JiBrok Stopwatch Stopwatch for Jira Cloud
JiBrok Time between dates Time between dates for Jira Cloud
JiBrok Fields panel for Jira Service Management (JSM) Fields panel for Jira Service Management (JSM)
JiBrok Display Linked Issues Display Linked Issues
JiBrok Display Linked Issues Display Linked Issues
JiBrok message field Message field
JiBrok time in status Time in status | SLA | Timer | Stopwatch
JiBrok Switch to User + Delegating SU (Jira) Switch to User + Delegating SU (Jira)
Group Delegate & Creation Management (Jira)
JiBrok Calculated fields Calculated fields (JBCF)
JiBrok Timer Field Timer Field (Forge) for Jira Cloud
JiBrok Stopwatch Field Stopwatch Field (Forge) for Jira Cloud
JiBrok Time Between Dates Time Between Dates (Forge) for Jira Cloud
JiBrok Display Linked Issues Display Linked Issues (Forge) for Jira Cloud
JiBrok Customer Portal Fields Panel Customer Portal Fields Panel (Forge) for JSM
rss
rss
rss