Where are you on your Jira journey? Automation means different things to different people and we’re all likely at different stages of our journey.
Level 1
If you’re still using paper forms to request things at your organization, then adopting Jira might be the first step in automating your processes.
Level 2
Then after using Jira for a little while, you start to explore the built-in time saving features like component auto assignment, workflow behaviors like triggers, conditions, validators, and post functions, and custom notification events.
Level 3
And finally, there’s the third level, where you want to extend Jira past its standard capabilities with apps, integrations, or scripting.
Let’s uncover the capabilities in level 3! Tempo is proud to present this recording with Rachel Wright showing real life use cases and how you can benefit from automating your Jira instance. This session includes opportunities, 25 ways automation can make your life easier, and real examples featuring Jira Cloud’s built-in automation and marketplace apps like: Automation for Jira, Jira Miscellaneous Workflow Extensions (JMWE), Jira Workflow Toolbox, and JSU Automation Suite for Jira Workflows.
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.
Use Case
Before work is started or an issue reaches its final workflow status, make sure it passes through the “Approval” status.
Requirements
You’ll need the following:
Access: Jira application administrator permissions (to install the app) and the ability to edit workflows
Environment: Jira Server, Jira Data Center, or Jira Cloud
Install: Install the JMWE app from the “Find new apps” page in your Jira instance. Apply a free trial or paid license on the “Manage apps” page.
In the “Previous Status” field, select the “Approval” status
In the “Error message” field, enter the copy “Please transition to the “Approval” status to collect approval.“
Click the “Add” form submission button and publish the workflow
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.
Using the same steps above, add a “Previous Status Validator” to the “Closed” transition
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.
Result
Test your work:
Transition your sample issue from its initial status to the “In Progress” status
The transition should fail and display an overlay with your custom error message
A transition from the “Open” status to the “In Progress” status fails and a custom error message is displayed.
Bonus: Allow selected issues to bypass the “Approval” status
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:
Create a custom “Select List” field called “Risk”
Create the selection values: “Low”, “Medium”, and “High”
Add the custom field to your issue’s screen
In the sample issue, set the “Risk” value to “Low” or “Medium”
Edit one of the existing Previous Status Validators
On the validator’s settings page, click the “Conditional validation” checkbox under the “Validator scope” header
Use the wizard to craft a simple Groovy script that checks the “Risk” field for a value of “High”
Click the “Issue Fields” button
In the “Select a field: ” form field, chose the “Risk” custom field
Under the “ACCESSING THE FIELD’S VALUE” header, click the “issue.get(“customfield_10700”) == “An option”” button
Note: Your custom field ID will be different than the example
In the Groovy statement inserted above, change the “An option” copy to “High”
Click the “Update” form submission button and publish the workflow
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”
Q&A
Why is the “To Do” status needed in the sample workflow?
Two reasons:
When an issue is approved, it doesn’t mean work automatically starts. There may be a review or assignment process that occurs before someone actually starts work on an approved issue. The “To Do” status helps signify that the issue is ready to work, but work has not yet started.
An issue must pass through the “Approval” status for the validator to function. Simply reaching the “Approval” status is not enough to indicate approval was collected.
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.
As a Jira administrator, I frequently see this problem: child issues are closed but nobody remembered to close the parent issue. Users have already moved on to the next thing and the parent issue sits in its incorrect status forever. Or maybe it’s the opposite: the Epic is closed, but its Stories, Bugs, and Tasks were forgotten.
When issue status does not reflect reality, reporting is a nightmare. All completed or unneeded issues should be transitioned to their final status. Why not take this step off your user’s “to do” list and automate it? It’s easy to automatically transition issues with Innovalog’s Jira Misc Workflow Extensions (JMWE) app.
Use Case
When all child issues are closed, automatically transition the parent so users don’t need to do it manually. Example: When all Sub-tasks are transitioned to the “Closed” status, automatically transition the Task issue to the “Closed” status.
Requirements
You’ll need the following:
Access: Jira application administrator permissions (to install the app) and the ability to edit workflows
Environment: Jira Server, Jira Data Center, or Jira Cloud
Install: Install the JMWE app from the “Find new apps” page in your Jira instance. Apply a free trial or paid license on the “Manage apps” page.
Issue Types: A “Standard” issue type (Example: Task) and a “Sub-Task” issue type (Example: Sub-task). These are default Jira issue types; they likely already exist.
Workflow: Create one simple, 3 step workflow. Example: Open > In Progress > Closed
Issues: Create one “Task” issue and two “Sub-task” issues
Implementation
Here’s how to do it:
Edit the workflow
In diagram mode, create a new global transition
Click “Add transition”
In the “From status” field, select “Any status”
In the “To status” field, select “Closed”
In the “Name” field, enter “Close”
In the “Screen” field, select your standard “Resolve Issue Screen”
Add Transition Screen in Diagram Mode
Here’s how the workflow looks, in Text mode, with the global “Close” transition.
Configure three areas on the transition settings page: “Transition(s)”, “Transition screen”, and “Comment text”.
Under “Transition(s)”:
Click the “Transition Picker” button to select the correct transition. Alternatively, you can type the name of the transition (Example: “Close”) or enter its ID (Example: “31”).
Tip: I prefer to enter the transition’s ID as it’s less likely to change than its label.
Click the “Add” button to the right of the “Workflow name” field. See screenshot
Under “Transition screen”:
Scroll down to the “Transition screen” section
Select the “Resolution” field from the drop down menu
Click the “Add” button
This will automatically set the parent issue’s Resolution to the same Resolution selected when the last child issue was closed. See screenshot
Next to “Comment text”:
Use the “Comment text” field to enter a comment when issues are automatically closed.
Example comment: “This issue was automatically closed when all Sub-tasks reached the “Closed” status.”See screenshot
Click the last “Add” button at the bottom of the transition settings page
Move the new post function after the function called “Update change history for an issue and store the issue in the database.”
The “Transition parent issue” behavior is the forth post function in the “Close” transition.
Also in the “Close” transition:
Add a “Sub-Task Blocking Condition” and select the “Closed” status. This prevents the parent from transitioning until all child issues are closed.
Example behavior: All sub-tasks must have one of the following statuses to allow parent issue transitions: Closed
If you want email notifications sent when the issue is automatically closed, go to the “Post Functions” tab and change “Fire a Generic Event event that can be processed by the listeners.” to “Fire a Issue Closed event that can be processed by the listeners.”
Finally, publish your workflow and assign it to the “Task” and “Sub-task” issue types in your Jira project.
Result
Test your work:
Transition one of your two Sub-task issues to its final “Closed” status
Refresh your parent Task and verify there was no status change, no comment, and no resolution added
Transition your second Sub-task issue to its final “Closed” status
Refresh your parent Task. The Task should automatically transition to its final “Closed” status with a resolution and comment added.
Bonus test: Create a Task issue with no Sub-tasks. Transition the Task to its final “Closed” status. Verify a transition screen is present to collect the resolution. Always make sure closed issues have resolutions!
The two Sub-task issues are in the “Closed” status. The parent Task issue was automatically transitioned to the “Closed” status, a resolution of “Done” was set, and a comment was added.
Q&A
Why did you create a global “Close” transition instead of a single transition?
I wanted to be able to transition the Task issue to the “Closed” status from any status. If users always transition Tasks to the “In Progress” status when they start work, you could create a single transition, in the “In Progress” status, instead.
Why did you add a transition screen to the “Close” transition?
For issues with no Sub-tasks, the user needs to select a resolution value. For issues with Sub-tasks, the parent issue’s resolution will automatically match the resolution of the last Sub-task closed.
Workflows are the most talked about area of Jira. Sometimes workflows don’t represent your real life process. Other times, there are too many manual steps and people hate it! Whatever the situation, users and admins are always interested in learning more and improving workflows. It’s no surprise that “Jira Workflows for Business Teams” is my most popular online course and that workflow materials are the most downloaded items in the Strategy for Jira store.
That’s why I’ve teamed up with Innovalog to help you improve your Jira workflows. Their Jira Misc Workflow Extensions app is one of my favorites in the Atlassian Marketplace. Want to extend your workflow capabilities without code, automatically transition linked issues, or make sure a certain field was updated? The JMWE app does it and so much more! This add-on brings the workflow automation power you’ve been missing in Jira Cloud, Jira Server, and Jira Data Center. I love this plugin so much that I included seven ways to use it in my book. Now, we want to bring those use cases and others to a broader audience. New articles for enhancing workflows are on the way!
About Innovalog
Innovalog, the Atlassian Platinum Top Vendor, is on a mission to make work flow. Their products enable Jira workflows for thousands of companies around the globe and power business-critical processes for millions of users. Jira Misc Workflow Extensions (JMWE) is one of the all-time top-selling apps for Jira! To learn more, watch this 80-second video.
About Rachel Wright
Rachel Wright is an entrepreneur, process engineer, and Atlassian Certified Jira Administrator. She is the owner and founder of Industry Templates, LLC, which helps companies grow, get organized, and develop their processes. Rachel also uses Atlassian tools in her personal life for accomplishing goals and tracking tasks. Her first book, the “Jira Strategy Admin Workbook“, was written in Confluence and progress was tracked in Jira!
Together we’ll help you improve workflows and make work flow.
0
0
Your Cart
Your cart is empty. Go add some materials!Return to Shop