Workflow Guardrails for Jira

Documentation & User Guide

Get the App on Atlassian Marketplace

Overview

Workflow Guardrails for Jira adds four rules that Jira administrators attach to any workflow transition. They keep parent and child work items consistent, make sure code is merged before work is closed, and require a recorded approval where your process needs one. Everything is configured on the transition itself, in the workflow editor. The app is free.

A transition blocked because child work items are not done
Special section in Workflow Rules.

Key Features

Children Must Be Done

Blocks a transition while sub-tasks, Epic children or "is parent of" linked work items are still open.

Pull Requests Merged

Blocks a transition while the work item has open pull requests.

Approval With Audit Trail

Requires an approver's keyword comment and records who approved and when.

Cascade Done

Closing a parent moves its open children to Done, with a comment explaining why.

Getting Started

  1. Install Workflow Guardrails for Jira from the Atlassian Marketplace.
  2. Go to Jira settings > Work items > Workflows and edit a workflow.
  3. Select a transition, open Rules and click Add rule.
  4. Pick one of the rules ending in (Workflow Guardrails), adjust its options and save. The rule list shows a one-line summary of what it checks.
  5. Publish the workflow.
Note: Configuring these rules requires Jira's new workflow editor. The app works as its own user ("Workflow Guardrails"), so it can see every child work item regardless of who moves the parent. Default permission schemes already give it what it needs.

Children Must Be Done (validator)

Blocks a work item from moving while any of its children is not in a Done status (any status in the Done category: Done, Closed, Cancelled…). The message lists the open children.

OptionDefault
Allow the transition when the work item has no childrenOn
Sub-tasksOn
Epic children (when the work item is an Epic or a level above it)On
Work items linked with "is parent of"On
Error messageCannot transition: child issues are not done
Children must be done configuration
The Children must be done options.

All Linked Pull Requests Must Be Merged (validator)

Blocks a work item from moving while it has pull requests that are still open.

OptionDefault
Allow the transition when no pull request is linkedOn
Pull requests in the Development panelOn
Pull requests added as linksOff
Error messageCannot transition: linked pull requests are not merged
Pull requests rule configuration
The pull request options.

Approval With Audit Trail (validator)

Allows the transition only after an approver commented the approval keyword on the work item.

OptionDefault
Approval keywordapproved
Required approvers (empty = anyone)Empty
Case-sensitive keywordOff
Only count approvals given since the work item entered its current statusOff
Record the approval as a comment on the work itemOn
Error messageCannot transition: issue has not been approved
Approval rule configuration with two approvers
Two named approvers and a custom keyword.

Cascade Done To Children (post function)

After the work item reaches a Done status, its open children move to Done too.

OptionDefault
Sub-tasksOn
Epic childrenOn
Work items linked with "is parent of"Off
Target status for childrenAny Done status ("Done" preferred)
Skip children already in a Done statusOn
Comment on each moved childOn
Comment textAutomatically transitioned to Done because parent issue was closed
Cascade Done configuration with a target status
Cascade Done with a specific target status.

Troubleshooting & Limitations

I cannot configure the rule after adding it.
Configuration screens for app rules require Jira's new workflow editor.
A child that was just closed still blocks the parent.
The rule re-reads every child's current status, so this should not happen. If it does, check whether the child's status is really in the Done category.
Cascade Done did not move a child.
Look for the comment on the parent: it lists each child that could not be moved and why. Usually the child's workflow has no transition to the target status from its current status, or the transition screen requires fields.
Pull requests are not detected.
Development panel pull requests need your Git tool's Jira integration. Pasted links are only checked when "Pull requests added as links" is on.
Limits
Up to 1,000 child work items are checked and 200 moved per transition; up to 1,000 comments are read for approvals.