Jira can be used for many different purposes, depending on an organization’s ITSM, asset management, or data management needs. Various processes like purchase orders, vacation requests, change requests, expenses approvals can all be deployed in an Atlassian environment and even scaled over time.
What do all those processes have in common? Approvals. However, in a system that relies on manually updating every request, approvals can be a bottleneck in the resolution pipeline and negatively impact your team’s overall productivity.
Thankfully, the Jira engine is very flexible and offers numerous ways of injecting automation into those workflows. When you use Insight to manage your organizational structure and roles, you can automate the process of sending any kind of Jira issues to the appropriate approver, based on criteria in the issue fields.
So, what does this mean exactly?
Let’s take a deeper look at a basic process by using vacation requests as an example.
Imagine you have a company with employees divided into 5 separate teams of differing sizes. Each team has a manager, and it’s the manager’s job to approve or decline vacation requests from the team members they oversee. In this case, we want the approver for the vacation requests to be automatically set as the reporter’s manager.
How do you accomplish this with Insight?
Step 1 - Create an Object Schema
The first step is to create an object schema for your organizational structure. This can be done by importing data from your LDAP or other sources, or it can be created manually the software.
An organizational structure will likely look similar to the one below, but the information we will be using in the example is the Employees object type, and the Jira User and Manager attributes.
Note, that the Jira User and Manager attributes need to be of the type User.
Step 2 - Create the Insight custom field needed
There are several ways to accomplish this, but for this example, we’re going to use the method that doesn’t require any scripting. For that, you need to create an Insight custom field to set the reporter’s name (hidden field). This will be used in an Insight post-function in the workflow.
In our example, we‘ll name the custom field “Automatic approval workflow field” and configure it as the following image shows.
Step 3 - Configure the workflow to automatically set the approver
In the “create” transition of the workflow, you need to add two Insight post-functions and place them appropriately in the line of events fired when creating the issue.
See the images below for more details.
The first Insight post-function
What is happening in this post-function is that we're looking up all employees where the reporter matches the Jira User attribute in Employees.
We're finding the user to set the it as a value in the Insight custom field “Automatic approval workflow field”, which is not shown on any issue screens. Its only purpose is for this specific workflow.
The second Insight post-function
In the next post-function, we're using the value from the Insight custom field that we updated in the first Insight post-function.
That value is used to look up the manager for the employee and update the
“Approvers” field connected with the manager’s Jira user.
When using Insight to manage your organizational structure, manually or by importing from your LDAP or other sources, you can automatically set the approver based on the reporter of a given Jira issue.
Automating the approval workflow like this has many benefits and can be applied to other scenarios in addition to the one we explained above.
Just some of the benefits include:
- You save time since you don’t need to select the approver when creating the issue (This is especially true if you are creating an issue on behalf of another person);
- By setting the approver automatically, the issue is immediately routed to the appropriate person; and
- This workflow setup automatically prevents the reporter from selecting the wrong person as the approver.
Automating approval workflows in Jira is just one of the many Insight features that enhance organizational growth and operational efficiency. From adding context to slash resolution time to building a powerful information hub using our free third-party integrations, Insight is the Jira app that continues to wow consumers around the world.
To see the product in action or to start your free trial today, click below!
Originally published Nov 29, 2019 3:00:00 AM
Late 2019, we did a brand split. Mindville is the company behind the Insight products. Riada provides expert consultancy services on all things Atlassian. Riada can be found at riada.se. Mindville is an Atlassian Platinum Top Vendor and Riada is an Atlassian Platinum Solution Partner.
Topics: Jira Service Desk