Integration with Jira Automation

Generic use cases

Integration with JIra Automation is also bi-directional. From our experience most the cases are connected with

Aligning statuses of Jira issues and Versions/Releases

  • Move version/release to in-progress when at least one of the issues is in-progress

  • Move version/release to done when all the issues are done

  • Update all issues to be done when version/release is done (could be other status aka closed, released, etc.)

Creating issues/updating fields in Jira

  • Create issue/sub-task when version is moved to a specific column (could be also edit, comment, etc)

    • aka create deployment/CM ticket for DevOps/CAB approval

    • create QA ticket for regression

  • Create a branch when moving version to a specific column

Notifications

We support various ways (Slack, MS Teams, etc.) of notification on version/package status change (in the future we plan to support on any change). With Jira Automation you can also turn on email notifications (as we avoid storing personal data in our Apps). This is in addition to Assignee and Watchers functionality that sends out emails on every update.

  • Send email when version moved to status

Automation for Epics

In Release Management we allow to track and manage Epics as releases. The below allows to sync Epic with Jira, namely:

  • Move Epics to certain column when issue moves to a certain status

  • Automatically add new Epics to the board

Release Management specific use cases

  • Create a milestone when issue of specific “issueType” is create/attached to version 

  • Assign environment when version is released / Epic moved to a specific column

  • Achieve milestone when the issue is done / Version is released

We suggest to use https://releasemanagement.atlassian.net/wiki/spaces/RM4J/pages/331710465 to run Automation in Jira as post action in Release Management or use our https://releasemanagement.atlassian.net/wiki/spaces/RM4J/pages/1081347 to execute some actions in Release Management in scope of Jira Automation rule.

The two examples below outlines these two scenarios.

A few examples

Update issues statuses in Jira with version status update

Let’s create an automation to move all encompassing issues to Done when version is moved to Done column in Release Management App.

Step 1: Create Jira Automation rule

Go to your Project Settings, select Automation and Create rule.

For the trigger select Integrations and Incoming webhook.

Select “Issues provided by running the following JQL search

Scroll down to “Can I provide additional data in my webhook?“ and click to expand.

Copy the example parameter and insert it into JQL statement above

Click Save.

Click New Action and select Transition Issue.

In Destination status select “Done“

Click Save and Turn on the rule.

Step 2: Create outcoming webhook in Release Management App

Open your board and click on Settings.

Select Webhooks and click Add hook.

Give it a Name and select Done column for versions.

In a seperate tab open your automation rule details, namily incoming hook details. You would need the following information:

Specify webhook details in Release Management:

Method: <POST>

URL: copy from Jira Automation rule (https://demo.releasemanagement.app/rest/cb-automation/latest/hooks/d78f6eccee7305e81f8663ab17f1f865fe197af6)

Header: <Name: Content-type, Value: application/json>

Request Body: <{"data": {"releaseVersion":""}}>

Step 3: Execute the hook to trigger the rule

Go to Release Management board and find any version that’s not Done from the respective Jira project. Assure there are some not completed issues.

Move this version to Done column.

Click on version again.

Congrats!

Once again click on Settings/Webhooks and find your hook.

Check the status is successful and find out details if you want.

Update version status in Release Management with Jira issue status update

Let’s create an automation to move version in progress at least one issue gets in progress.

Step 1: Generate Token

Go to https://releasemanagement.atlassian.net/wiki/spaces/RM4J/pages/1081347#How-I-can-get-a-Token-to-access-API? section to learn how to generate token and section to learn how to make calls to our Rest API.

Find out more about personalized tokens here .

Step 2: Find out some properties you would need (e.g. destination ColumnID)

If you want to move version into certain column upon issues status update you would need to know destination column id. You would need to use our to get it.

Please copy board ID:

.. and click on API icon:

Find board by ID endpoint:

Past BoardID copied above and execute it.

In response you will get a collection of columns and versions associated with it.

Please find the column you need and copy ColumnID:

Step 3: Create rule with Jira Automation

Go to your Project Settings, select Automation and Create rule.

For our use case we will use Issue transitioned trigger.

Select appropriate statuses and save it.

Now we would need to add New Action - Send Web Request

URL: <https://demo.releasemanagement.app/rest/release-management/1.0//board/BoardID/version/{{issue.fixVersions.id}}/move>

Header: <Name: Authorization, Value: Bearer Your Personalized Token>

Method: <PUT>

Request Body: <Custom data: {"columnId": DestinationColumnID}>

Almost there - put a name & click “Turn on“ rule.

Step 4: Test it out

We have version in To-do column.

With all the issue in To-do status.

Let’s change status of one issues to Sprint-development

As a result the version was moved to Sprint Development column.

Let’s check the audit log of the rule.

Enjoy it!

Create Release in Release Management and assign Tags

This is the use case of creating Release, putting it in specific Column and assigning Tag to it. Why it’s important? - It shows how you can create multiple actions with Jira Automation and connect execution of one action with another.

Step 1: Get Prerequisites in place

From previous example you know how to:

Step 2: Create Release with Jira Automation

Go to your Project Settings, select Automation and Create rule.

Select the Trigger and Conditions you need

Add Send Web Request action

Add the following parameters:

URL: <https://your_jira_url/rest/release-management/1.0/release>

Header: <Name: Authorization, Value: Bearer Your Personalized Token>

Method: <POST>

Request Body:

{ "name": "Release for: {{issue.summary}}", "description": "Release Description Description", "versionIds": [], "virtualVersionIds": [], "columnId": your_column_id, "boardId": your_board_id, "startDate": "2023-11-01", "releaseDate": "2023-11-30" }

Please make sure you specify empty versionIds and virtualVersionIds arrays. Otherwise you get the following response with error:

{ "errorMessages": [], "errors": { "versionIds or virtualVersionIds": "Required field" } }

IMPORTANT: Make sure that “Delay execution of subsequent rule actions until we've received a response for this webhook“ is enabled for release creation webhook. This will allow to create subsequent actions to assign additional properties to release for e.g. Add Comment, Assign Tag, Add Milestones, etc.)

Step 3: Add subsequent action (e.g. to Assign Tags to Release)

Create another Webhook action

Add the following parameters:

URL: https://your_jira_url/rest/release-management/1.0/tag/release/{{webhookResponse.body.id}}

Header: <Name: Authorization, Value: Bearer Your Personalized Token>

Method: <PUT>

Request Body: Array

["MyTag","AnotherMyTag"]

Save the step and the whole rule.

Test it and make sure that the execution status is Green.