The problem

Every Jira admin ends up wanting the same handful of workflow rules: a work item cannot be closed without a due date, a comment is required when something is sent back, only the assignee can move it, linked work must be finished first, and after the move the assignee, labels or resolution should be set and the parent nudged along. Jira ships a few of these; the rest live in workflow suites that cost more per user than Jira itself and do a hundred other things.

What Guardrails does

Guardrails adds fifteen rules to Jira's workflow editor, each configured in a few clicks:

  1. Validators (block the transition until the work is ready): required fields, with values entered on the transition screen counted; comment required; a text field matching a pattern; subtasks, linked work or the parent finished; a date field today or later or after another date. Each rule has its own message to the person who is blocked.
  2. Conditions (hide the transition unless it applies): only the assignee, the reporter, the project lead or named people; priority, work type, labels, components, versions or resolution among allowed values; all subtasks done; linked work done; an attachment present. Conditions are Jira expressions that Jira evaluates itself, so they apply everywhere, including the REST API and automation.
  3. Post functions (act after the move): set the assignee to the reporter, the project lead, the person transitioning, a named person or nobody; set the resolution, add or remove labels, clear fields, set the due date a number of days ahead; add a comment from a template with placeholders; move the parent, the subtasks or linked work items to a status; add a watcher.

Every rule shows what it does next to the transition in the editor, so an administrator can read a workflow without opening every rule. A rule that cannot be evaluated lets the transition through and logs why, so a deleted field never locks a workflow.

How it is built

Forge only, no egress and no storage of its own: the configuration of each rule is kept by Jira with the workflow. The settings forms are one Custom UI React app (Jira's workflow editor does not render UI Kit inside the Add rule dialog), with field, people, link type, status and resolution lists read from the site. Validators and post functions are Forge functions on the jira:workflowValidator and jira:workflowPostFunction modules; conditions are generated Jira expressions. Subscription state is read from the invocation context, so an unlicensed site is told so in the form and the rules stand down instead of locking anyone out.

Built With

Share this project:

Updates

Submission history