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! :)
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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.