Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is is possible to delete a Release from an Automation

Rafael Miranda May 31, 2023

Hi guys.

I've created an automation that automatically creates RELEASES based on the due date. Likewise, I would like to delete it if there are no issues included in that release.

I managed to get to the point where I do know if there's any issue assigned to that release, but now I can't find an action to delete it.

Does anyone know how can I solve this?

Thank you in advance! :)

2 answers

1 accepted

1 vote
Answer accepted
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.
May 31, 2023

Hi @Rafael Miranda -- Welcome to the Atlassian Community!

First thing: I have not tried this, and...

There is no built-in rule action to delete a version.  There is an REST API method to delete a version, and so you could use the Send Webrequest action to call it.

Here are some references if you want to try that:

Kind regards,
Bill

Rafael Miranda June 1, 2023

Hi @Bill Sheboy - Thanks for your help!

I implemented your solution and it is working flawlessly, which for now completely solves my problem.

The only issue in the long term is that the authorization is coupled with a specific user's api-token, which requires it to be updated if the user is deactivated in the future.

I Hope Jira implements this action in the future 🤞

Thank you!

Like Bill Sheboy likes this
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.
June 1, 2023

I am glad to learn that helped, and I agree on the user credentials impact for API tokens.  There is at least one suggestion to improve that feature: https://jira.atlassian.com/browse/JRACLOUD-81006

Like Rafael Miranda likes this
0 votes
Justin Luk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 23, 2023

@Rafael Miranda How did you setup your automation to determine if a release has 0 issues assigned to it? I'm trying to do the same thing you are. Would you mind sharing please?

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.
August 24, 2023

Hi @Justin Luk -- Welcome to the Atlassian Community!

Have you tried using JQL with the Lookup Issues action?  The results can be checked with an advanced compare condition to learn if the results are empty (i.e., equal to 0 size):

{{lookupIssues.size|0}}

Kind regards,
Bill

Like Rafael Miranda likes this
Rafael Miranda August 24, 2023

Hi @Justin Luk - Hope you're well.

I've used the automation triggered by the change of the DueDate, which then creates the Release to that date or assigns it if it already exists. On that automation, before changing the fix version I've saved it in a variable and then did the lookup issues by Fix Version equal to that variable, as @Bill Sheboy suggested.

If it retrieves zero, it means that the Release has no issues assigned.

Hope it helps. :)

Kind regards,
Rafael

Like Bill Sheboy likes this
Justin Luk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 25, 2023

Thanks for your response Rafael, how did you store the fix version in a variable? Are you scripting your automations or using the interface in Jira to create them?

Suggest an answer

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

Atlassian Community Events