Integration with Jira Automation

Generic use cases

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

Aligning statuses of Jira issues and Versions/Packages

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

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

  • Update all issues to be done when version/package 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)

  • Send email when version moved to status

Automation for Epics/Sprints

In Release Management we allow to track and manage Epics and Sprint as versions. The below allows to sync the two with Jira, namely:

  • Move Sprints to certain column when created/started/completed

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

  • Automatically add new Sprints/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 / Sprint is closed  / Epic moved to a specific column

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

  • Automatically add Compass Components (in the future also Classic “Project-based“ Components) when added to issue comprising version

We suggest to use https://releasemanagement.atlassian.net/wiki/spaces/RMC/pages/2522284033 to run Automation in Jira as post action in Release management or use our https://releasemanagement.atlassian.net/wiki/spaces/RMC/pages/2445246483 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 and click on Automation to create one.

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 Release Automation rule

Open your board and click on Settings.

Select Automation and click Add rule.

Give it a Name, make status Active and scope equals Version.

Add Version moved trigger

Select Field condition and select Done for Status.

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

Go back to Release Automation rule and add Execute Webhook as Action.

Specify the following webhook details:

Method: <POST>

URL: copy from Jira Automation rule (https://automation.atlassian.com/pro/hooks/10a55cbf5891d2e793558887278650a768e2b070)

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

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

Step 3: Trigger the Automation 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 API token

To create API token please use the below standard Atlassian UI to get one.

https://id.atlassian.com/manage-profile/security/api-tokens

Copy your generate token and store it somewhere for time being.

Step 2: Convert it into Base64

To use our APIs you would need to convert it onto Base64. There are number of third party tools to help here. We suggest to use https://www.blitter.se/utils/basic-authentication-header-generator/

Please put your email (same email as used for API token) as user name and previously generated API token as a password:

Copy & store you Base64 token.

Step 3: 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 4: Create rule with Jira Automation

Let’s go and create Automation Rule in corresponding Jira Project.

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

Please specify the following parameters and click Save:

URL: <https://<YOUR_JIRA_URL>.atlassian.net/plugins/servlet/ac/app.releasemanagement.rmcloud/board?classifier=json>

Header: <Name: Authorization, Value: Base 64 token from above>

Method: <GET>

Request Body: <Empty>

Also please put tick on “Delay execution of subsequent rule actions until we've received a response for this web request

We need this request to gain JWT token to execute actionable changes with Release Management Rest API.

Now let’s move the version into destination column.

For this we need to send another Web Request. The parameters are the following:

URL: <https://rmcloud-prd.releasemanagement.app/api/1/board/BoardID/version/{{issue.fixVersions.id}}/move?columnId=DestinationColumnID>

Header: <Name: Authorization, Value: JWT {{webhookResponse.body.contextJwt}}> (this is exactly JWT token for our Rest API that we extract from previous response)

Method: <PUT>

Request Body: <Custom data: {"versions":[["{{issue.fixVersions.id}}",true]]}>

If you intent to move into one of “Released“ columns the version must have a release date specified otherwise you will get an error: “Release date is required to move this version to released column“. You can also specify release date as you move using the following syntax

Request Body: <Custom data: {"versions":[["{{issue.fixVersions.id}}",true]],"releaseDate":"YYYY-MM-DD"}>

If you need help with datetime smart value please check out this space - .

Almost there - click “Publish“ rule.

Send email upon Release status change

In Release Management App we allow to send Slack/Teams notifications upon release change via . We do not support “Sending Emails“ as possible actions, but Jira does. Therefore, it’s possible to create an automation rule with outcoming hook so Jira Automation receives a payload and construct the message you want to send.

Let’s see how we can do it.

Step 1: Create Jira Automation rule

Navigate to Automation in Jira and create a rule.

Select Incoming webhook as trigger.

Copy Webhook URL, you would need it in Release Management.

Select “No issues from the webhook“.

Add “Send email“ as action.

Put some temporary Subj and Body for now. We will come to it later.

Click Save.

Step 2: Create Release Automation rule

Click Settings on your Release board and select Automation.

Add new rule.

Give it some Name.

Select Scope - Version or Package

Click on Triggers and decide when you want to fire up and email. For the sake of example let’s select version move (=status change).

Add condition if you want to fire email only if the version move to a specific column(s).

Add “Execute WebHook“ as Action.

Give it some description.

Copy the URL from Jira Automation (URL from incoming webhook action in Jira Automation rule).

Define Payload that want to stansfer via the hook. In other words version/package properties you would need to compose a message for your recipients.

The format of the payload is JSON. You can use any available JSON validator to verify the correctness of the data.

{
"data": {
"updatedVersionName": "{{ }}",
"updatedVersionStatus": "{{changedProperty.newValue}}",
"versionURL": "{{entity.link}}"
}
}

You are free to call the parameters in the data collection the way you want so it’s easier for you compose a message on the later stages.

As values you can either hardcode smth in the payload or use some dynamic values from .

Click Save & Save.

Step 3: Compose the message and turn on

Now let’s get back to Jira Automation rule an open it for Edit.

You can now use the data passed from Release Management to update the Subject and the Body the way you like, for e.g.

Subject

Version {{webhookData.updatedVersionName}} changed

Body

Hi there,

We would like to notify you that version {{webhookData.updatedVersionName}} was moved to {{webhookData.updatedVersionStatus}} status.

For more details: {{webhookData.versionURL}}

Kind regards,

Release Management Team

Turn on the rule.

Step 4: Troubleshooting automation

If you are triggering the action but not necessarily see the expected output (e.g. email being sent)

1st Navigate to Release Automation rule

Click on History. Check the last item and select “Show more“.

Scroll to see any reason if the status is Failed to help you troubleshoot.

2nd Navigate to Jira Automation

Click on Audit log. Get the latest relevant item and select “Show more“.

Scroll to investigate the issue if status is “Some Errors“.

Need any further help … reach out to our support.