Webhook response in Jira automation

Gilad Waldman
Contributor
December 27, 2024

After creating an automation that gets latest released version number, merges all minor jira releases into a major and releasing the major version, i left with the minor versions unreleased and with no tickets in.

12.png

 

So am looking for a way to auto delete these minor versions. Reading in the community, i noticed the best workaround is with REST API via webhook -  get all versions and then run over the results, extract the version i need by name and get their id for another rest api delete step. Anyone has better approch? 

Thank you.

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 27, 2024

Hi @Gilad Waldman 

First thing: how is your team using the "minor version" releases?  That is, are they:

  1. just holding buckets, and never intended to be Jira-released as versions or to production code,
  2. they were incrementally released to production code but the version was not Jira-released,
  3. something else?

Considering these may give you other ideas how to use the "minor versions".

 

For now, let's assume it is #1 and they are just holding buckets in Jira and not for release.  In that case, calling the REST API with the Send Web Request action would be needed as there is no "delete version" rule action.

The REST API endpoint to Delete Version has been deprecated, and replaced with Delete and Replace Version.  With that one, your rule could combine the operations by:

  • identify each "minor version" for a releasable, "major version"
  • branch over, and call the endpoint once for each "minor version" to update them to the major and delete the minor

 

Here is a how-to article for calling a REST API endpoint from a rule: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

And here is the new Delete and Replace Version endpoint: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-versions/#api-rest-api-3-version-id-removeandswap-post

And here is a how-to article to determine the correct custom field ids needed for the above call: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events