Background situation of JSM approval workflow change
Example: A company has a specific workflow in Jira Service Management that requires approval from four people before changing the status of the ticket. Only when all four people approve, the JSM ticket processing can start.
The image shows the workflow that our project uses:
This image visualizes that all four people with approval function must agree before changing the status.
In our example, the settings of the approval workflow are now changed: Now, only the approval of one person is necessary to change the status. So now the ticket status will be changed as soon as one of the four people (no matter if 1, 2, 3 or 4) approves the ticket.
Below, you can see the new configuration:
In Jira Service Management, we also have open tickets in pending status that were created before the workflow modification. Although we have updated the workflow and the tickets are connected to the new workflow, we need to manually adjustments to synchronize the pending status tickets with the new settings.
This is because although all tickets, including older ones, now say “1 approval needed”, the settings for pending status tickets are still the same.
Unfortunately, there is no simple solution with bulk changes here, because you don’t have the same approving person for every ticket.
At this point, we would like to share a groundbreaking solution with you that our Actonic Consultants have figured out on their own.
Here’s how it works:
Step 1: First, we make sure that the old tickets are also using the same workflow to rule out the possibility that the error lies in the workflow. We do this by clicking on “View Workflow” in the status of the ticket.
Step 2: Next, we open one of the old tickets in pending status that needs to be updated with the new configuration. We export this ticket to XML format to find the issue type ID.
An issue type ID is required from each non-working ticket. We will identify them during our testing process.
Step 3: We open the downloaded file with any text editor and copy the issue type ID and save it, because we need it later.
We repeat this step for all affected issue types.
Step 4: Then we use a Postgres client app to open the JSM database. In our example, we use the app “Beekeeper Studio” for Mac. It is a freeware that allows us to edit things in the database.
Step 5: Now we select the database which is connected to our Jira Service Management. As next, we pick the public folder and then the approval folder, so here it’s the table “AO_56464C_APPROVAL”.
Backup time: Please remember to make a backup of the database before making any changes.
Step 6: In the approval folder, we will find the issue type IDs we need. Because we are not looking for the tickets, we are looking for the issue type IDs that we already have researched and saved.
This approach with the Issue-Type IDs is the fastest way to get to our goal. If we wanted to change the individual tickets, that would take a lot more resources. You might have a million tickets, but you certainly don’t have that many issue type IDs in your organization for a single project.
In our case, we came up with IDs 11000, 11001, and 11002.
Here’s the twist: For these IDs, we change “APPROVE_CONDITION_TYPE” from “percent” to “number”. We also change “APPROVE_CONDITION_VALUE” from “100” to “1”.
Step 7: We then save the changes and go to our administration in Jira Service Management. Here, we open a new browser tab and log in as “Approver A”. In our case, this is one of the people who can approve a ticket.
Now we can open an old ticket and check if our database changes worked.
We click on “Approve” and see that the ticket status has been changed to “Waiting for support” and that there is only one approval necessary.
So the workflow change has been applied to the pending status tickets as well now.
If you have the problem of new settings to be applied to approval workflows in JSM, there is no bulk change solution. If you ask the Atlassian Support for help, you get the answer that you should manipulate the database. How exactly is not revealed. But the database is very sensitive and without guidance or absolute expert knowledge you should not make any changes here.
That’s why we developed this unique solution where you change the condition type of the approval from percent to number.
Our Actonic style approach is the fastest and safest way to achieve your goal and efficiently adapt open Jira Service Management tickets in pending status to the new approval workflow.
Want more information? Simply arrange a free consulting session with our experienced consultants. We will be happy to advise you!