It’s smart to make Jira workflows as simple and flexible as possible. I like to give users multiple ways to transition issues between statuses and even let them skip statuses when needed. But sometimes skipping a status is undesirable or creates a compliance problem. Consider an approval status for example. You’d certainly fail an audit if work was started on an issue or an issue was completed before it was approved. Luckily, Innovalog’s Jira Misc Workflow Extensions (JMWE) app has a validator to prevent it.
Before work is started or an issue reaches its final workflow status, make sure it passes through the “Approval” status.
You’ll need the following:
We’ll use the following app features:
Simple workflow with an “Approval” status and global transitions
Set up or create the following:
Here’s how to do it:
On the validator’s setting page, the “Approval” status is selected and a custom error message is provided (optional).
The “In Progress” global transition has one validator, requiring an issue to have previously transitioned through the “Approval” status.
With the two validators in place, issues may not skip the “Approval” workflow status. The validator checks the issue’s transition history, to make sure it previously reached the “Approval” step.
Test your work:
A transition from the “Open” status to the “In Progress” status fails and a custom error message is displayed.
If an issue is small or low risk, you may want to conditionally bypass approval. An easy way to do this is by checking the value of a custom field before executing the transition validator.
Here’s how to do it:
This simple script allows issues with a Risk of “Low” or “Medium” to ignore the entire validator. Learn more about Groovy customizations here.
With this added condition the validator only runs if the “Risk” field’s value is “High”
Why is the “To Do” status needed in the sample workflow?
Two reasons:
Why did you use the “Previous Status Validator” instead of the “Previous Status Condition“?
Workflow conditions allow you to show or hide transitions. I wanted the “In Progress” and “Closed” transitions to display regardless of whether the issue reached the “Approval” status.
Still having trouble? Check the Jira log file, turn on error handling on the Jira Misc Workflow Extensions Global Configuration page, review the JMWE documentation, review answered questions in the Atlassian Community, or raise an Innovalog support request.
Rachel Wright
Author, Jira Strategy Admin Workbook
Industry Templates, LLC
Traveling the USA in an RV
46 accepted answers
0 comments