Forums

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

Automation to release specific fix version fails to find a match

Joshua Tilton October 4, 2022

We have automation in place when we create a specific issue type for a HotFix that creates a Fix Version with a specific name.  This automation is performing as it should and assigns the name, the start date and, if we want, a release date (tested with and without in case it was affecting the ability to release the version through automation). 

Unfortunately I am unable to determine the proper setup to release that fix version when the ticket is moved to "Done".  The automation fires, but it fails to find a matching version.  Here are the steps I am using, the comment portion was a "debug" and returns the expected fix version name, so I am unsure why the final step fails:

image.png
The Audit Log shows:
image.png
When I look at the comment it has, for all three smart tags, the expected version name.

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.
October 4, 2022

Hi @Joshua Tilton 

To reference a version as a smart value for the Release Version action try using the id instead of the name:

{{issue.fixVersions.last.id}}

Also, do you ever expect there to be multiple fixVersion values assigned for this issue?  How about no values?  If either case applies please update your rule accordingly.

Kind regards,
Bill

Joshua Tilton October 6, 2022

The automation asks for the name, this is my my recent attempt using just {{triggerIssue.fixVersions}}:
image.png

I tried the ID with the same result.  The issues all have a single fix version applied, that version is successfully create by Automation when the ticket type is created.  Unfortunately I don't know a way to test the automation outside of the workflow to verify, so I have to wait until we have a live scenario.

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.
October 6, 2022

First thing: I would create a test project to experiment with a rule like this.  That can allow faster development and safer testing.  When done, you may copy/edit the rule into the target project.

This rule worked for me using the version's name when I explicitly selected the Project from the drop-down in the Release Version action.

  • trigger: issue transitioned to done
  • advanced compare condition...to check if there is one-and-only-one version to release
    • first value: {{issue.fixVersions.size|0}}
    • condition: equals
    • second value: 1
  • action: release version
    • specific version name to release: {{issue.fixVersions.name}}
    • project: I selected the project matching the trigger issue/rule location
Joshua Tilton October 13, 2022

Changing the value to {{issue.fixVersions.name}} and not specifying a particular one (first, last etc) did the trick!

Like Bill Sheboy likes this
1 vote
Stefan Salzl
Community Champion
October 4, 2022

Hi @Joshua Tilton 

could you please show the whole automation rule? Are you sure the fixVersion is set in the issue ? I can reproduce this when there is no unreleased fix version.

Best
Stefan

Joshua Tilton October 6, 2022

Here is my rule, with some redactions for security:

image.png

And here is the Audit result:
image.png

The "Comment on Issue" portion returned the expected Fix Version Name using any of the 3 smart tags, but none of those worked in the final step (I've tried 5 different smart tags at least)

Stefan Salzl
Community Champion
October 6, 2022

Hi @Joshua Tilton 

Regarding your 3rd condition: Could those issues that should trigger the release be in different projects?

furthermore:
within your release version action there need to be declared a project where the version should be released. how is the action configured? Did you check/can you make sure that the version is unreleased at the time of release attempt/automation rule activation?

and:
regarding your predecessor automation rule: is the hotfix version created in the same project?

 

Best
Stefan

Joshua Tilton October 13, 2022

The release is still unreleased when the issue is transitioned to "Done"

The issues that trigger the release are always in the same project as the release, it is a 1:1 relationship.  

  1. Issue is created, release is created via automation
  2. Issue proceeds through workflow
  3. Transition to "done" fires release automation which fails to find a matching release that was created in step 1, although the name of that release can be logged as a comment successfully.

It appears the automation of releasing by release name has a fatal flaw where Name is perhaps not how they should be referencing it, but that field is not editable.

Suggest an answer

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

Atlassian Community Events