Close package when all versions are closed

Topics

Disclaimer

This functionality should be archived by delegating business logic to 3rd party system that should check conditions and execute calls to the Release management API

Step 1: Obtain 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 Swagger: Rest API & Integrations | How to execute calls to our APIs section to learn how to make calls to our Rest API.

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 Swagger: Rest API & Integrations 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 for versions:

and for packages:

Step 3: Create Jira automation to trigger 3rd party system that will execute the logic

For this step, an external processor should process incoming webhooks and make a set of API calls to release management, as Jira automation is not powerful enough to cover that need.

The processor should be chosen and configured to accept Jira version ID

 

After that, the processor would need to execute the following actions with token from the Step 1

Get all packages for the version

Get version details to collect all packages from the version:

Please NOTE that the version could belong to multiple packages

 

Get package details for each package from the previous step:

Get IDs of all versions in the package

Check if all the versions are in needed status by using the previous endpoint

If all versions in the needed status, execute a call for moving package to needed destination status:

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

Method: <PUT>

Request Body:

{"columnId":<destination_column_id>,"afterReleaseId":null}