I have an automation rule to create a release version and then release it and mark the issues/tickets and done and resolved. What happens is if multiple issues are in the release, the first time the rule runs it goes fine but then it runs and fails for all the other issues because the version name already exists
is there a better way to do this?
OK I think I have a fix in place now - will come back to this if this does not work as we hit other workloads but new layout is this:
With the "edit issue field - Fix Version" using the fix version for the next unreleased version
Although you may be able solve this within the rule, you may want to pause and think about your process. You appear to have only posted part of your rule, and if I am understanding from your rule. If possible, please post an image of your complete rule.
You note this fails for subsequent calls, but I wonder why as...
Some Options are:
a) confirm if the second attempt to create the version is causing the remainder of the rule to fail. If not, consider ignoring the error. (This was recommended in another community post for this use case.)
b) think about when you create versions and decide if they should be done independently of issue handling
c) call the REST API using a webrequest to check if a version already exists.
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Bill Sheboy this is the full rule - it has worked for a while now, just again its more an annoyance that when I look at run audit logs it shows some failed with errors.
it 100% fails for issues 2 through 4 because the timestamp version name is the same - this is because its doing it for each ticket (qty4) the commit short has I was using to try to add more uniqueness until I found the real issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! Looking at your image, there appears to be a component above "When: Deployment status changed.." which I why I asked if that was the complete rule as no trigger appears to be shown.
Is the rule triggered separately for each issue, 1-4, or one execution trigger gathering and processing 4 issues?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oh no so when deployment status changed is a trigger - since we have bitbucket, when the issue linked to the branch sees the pipeline deployed to Prod it triggers this rule
I believe its the former.. since each issue is its own Jira ticket with its own bitbucket branch but as I said its strange on first run it gets all 4 issues in the first release, which is reight and then fires empty and so fast it makes these empty duplicate releases which never actually get created (since they would in theory sit in a unreleased state)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for clarifying that!
If your goal is to have the 4 issues (with different branches) in the single Jira version/release, please take a look at those subsequent firings to see if there is information in the trigger message that can be used to ignore the version creation steps in the rule.
If instead your goal is to have each issue in a separate Jira version/release, you would need to modify the version create in a manner which makes its name unique, as you cannot rely on date/time {{now}} without using the millisecond format.
Otherwise, there may be a defect in here, and I recommend that you submit a support ticket to Atlassian to see what they say about that trigger. You should be able to do that as site admin for a paid instance here: https://support.atlassian.com/contact/#/
Once you hear back from support, please post what you learn so the entire community can benefit. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.