Use case: Approval start upon transition
This document will guide you to automatically start Approval Path on any work item that will go through a particular status transition.
This will help you skip the hassle of manually starting the approval on every single work item.
Use case
There is a particular approval that is required for every single work item created in a space. When a work item is created, in the “backlog status”, it must be approved before being transitioned to the “In progress” status.
We can add a third status, “Waiting for approval,” and use this status as a trigger to initiate the approval path.
Therefore, any work item that will transition to this status will start the approval path.
Pre-conditions
Have the status you wish to use as the trigger (for example: Waiting for approval)
Create an API key Documentation
Make sure the “Create” Approval privilege is granted
Automation steps
Navigate to the space settings
Select the “Automation” tab
Click on the “Create rule “ button → “Create from scratch”
Search for the “Work item transitioned” trigger
Select the trigger
There are two fields of “From status” and “To status”; select which status change should trigger the action to be taken, in this case. (For example: In progress -> Done)
Click on the “Next” button
Click on the “THEN: Add an action” button
Search for “Send web request” action type
Select the action
Fill in the data
Web request URL
https://app.approval-path.com/webapi/approvals/{{issue.key}}HTTP method
POSTWeb request body
Custom dataCustom data
{ "definitionId": "id of approval definition you want to start", "summary": "Demo transition trigger" }*Definition ID can be obtained from the definition page
Headers
Authorization
Bearer + your API key value (for example:
4mbmqXaw4cATK9BMXblqFiD6ei3q4vSdsYVGQ9CKFsrf)
Click on the “Turn on rule” button
Select a name for this Rule
That is all!
Now, whenever the issue is transitioned, the approval path will start automatically.
Here is a sample result, where after changing the work item status from “Backlog” to “Waiting for approval”, an approval definition named “Here is an approval definition” is started automatically: