Use case: Approval start upon transition

This document will guide you to automatically start Approval Path on any issue that will go through a particular status transition.
This will help you skip the hassle of manually starting the approval on every single issue.


Use case

There is a particular approval that is required for every single issue created on a project, when an issue 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 approval path.

Therefore any issues that will transition to this status, will start the approval path.

Pre-conditions

  1. Have the status you wish to use as the trigger (for example: Waiting for approval)

  2. Create an API key Documentation

  3. Make sure the “Create approval for issue” privilege is granted

Automation steps

  1. Navigate to the project settings

  2. Select the “Automation” tab

  3. Click on the “Create rule “ button

  4. Search for the “Issue transitioned” trigger

  5. Select the trigger

  6. There two field of “From status” and “To status” select which status change should trigger the action to be taken, in this case. (For example: Backlog -> Waiting for approval)

  7. Click on the “Save” button

  8. Click on the “New action” button

  9. Search for “Send web request” action type

  10. Select the action

    1. Fill in the data

      1. Web request URL https://app.approval-path.com/webapi/approvals/{{issue.key}}

      2. Headers

        1. Authorization

        2. Bearer + your API key value (for example: 4mbmqXaw4cATK9BMXblqFiD6ei3q4vSdsYVGQ9CKFsrf)

      3. HTTP method POST

      4. Web request body Custom data

      5. Custom data

        { "definitionId": "id of approval definition you want to start", "summary": "Demo transition trigger" }

        *Definition id can be obtained from the definition page

  11. Click on the “Save” button

  12. Select a name for this Automation

  13. Click on the “Turn it on” button

  14. That is all!

Now whenever the issue is transitioned (in this case from Backlog to Waiting for approval), approval path will start automatically.

Here is the result: