Jira Automation: How to keep version on specific issues when version is released

Alain BEAULIEU
Contributor
June 13, 2024

Hi,

This is a special/non-standard case.

When we release a version, this pop-up appears and we normally choose to push undone issues up to the next version:

2024-06-12_13-36-31.jpg

I want to create an automation rule triggered on the Version Released event. I want the rule to check every issue included in that release, and if the issue contains a given XYZ label, then do not increase the version number even if in the above screenshot the option to move unresolved issues to a given version is selected.

If that is not possible BEFORE the release, then AFTER the release I want the automation rule to check all the issues again but this time if the Labels field contains a label called ABC_STATUS, then:

  1. Remove the Resolution value in the issue;
  2. Return the issue to the ABC_STATUS status (a real status in our workflow);
  3. Revert the FixVersion to the one it had before the release. Note that our tickets have multiple versions in FixVersion (e.g. 9.30.001, 9.31.005, 9.32.002), so I only want the version concerned to be reverted.

Basically, I want some specially labeled tickets to not move when a version is released and I'm not sure how to use branching with the right conditions in Automation.

And I'm using Labels but it could be any field that might be used to identify and prevent these special issues to move up.

Ice cream cone to the first one with an answer.

2 answers

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.
June 13, 2024

Hi @Alain BEAULIEU 

Based on my understanding, anywhere in the Jira UX where you can "release" a version is going to show that dialog box, and that seems it would be too late for what you want to do. 

Instead you may need to create a rule, perhaps manually triggered from an example issue or scheduled, that would update the Fix Version values to meet your conditions before hitting the "release" button.

Kind regards,
Bill

Alain BEAULIEU
Contributor
June 14, 2024

Hi @Bill Sheboy and thanks for taking the time to answer.

I'm not sure it would be too late, because nothing happens if you click Cancel. Also I'm pretty sure that the Version Released event gets triggered when you click Release. The question is more if you can interfere with the version increase before it happens or if you're stuck having to do it after the fact. It's only MHO.

That being said, how do I go about cycling through the issues involved during the Version Released automation? I think I have to branch, but how do I tell Jira:

  1. For Each Issue
  2. If [CONDITION IS MET]
  3. Replace FixVersion [THIS RELEASE'S VERSION] with [THIS RELEASE'S VERSION - 1]
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 14, 2024

With the version-related triggers, the rule may then branch over "issues in version".  Then use rule conditions for your test and actions for the version changes.

I suspect you may need to use advanced edit with JSON and text functions to specifically remove the version from the field.

Alain BEAULIEU
Contributor
June 14, 2024

Nothing I have tried in the last 2 hours of branching tests I made worked to "hit" issues. I always get "No actions performed" in the Audit Log.

I followed your advice I saw in another thread to set up a test environment, and tried to make this as simple as I could. So I decided I would simply add the name of the version being released to the Description field of a single test issue I created. So:

  1. I created a fake version called 10.1.001 and another one called 10.1.002.
  2. I created an empty issue, assigned it to me and added 10.1.001 in the FixVersion field. This is the only issue in this version.
  3. I left the issue in a blue status (which means StatusCategory = In Progress). This is what I want ultimately.
  4. Then I went to Releases, released version 10.1.001 and selected to move unresolved issues to version 10.1.002. I'm expecting my fake issue to be concerned by this and have its Description field show 10.1.001 -- or 10.1.002. I don't care at this point, I just want to "catch" the issue. I could write "potatoes" but I though using the version smart value would be more relevant to my learning curve.

In Automation, I have the Version Released trigger. I have tried the following branching:

  1. Issues fixed in version: this doesn't work and I believe it's because my issue is not "fixed". It's still in progress.
  2. JQL with FixVersion = {{version.name}} and assignee = currentUser(): that didn't work either and I don't know why. I have tried without assignee = currentUser() -- nothing.
  3. I have tried numerous other nonsensical branching strategies which yielded nothing.

For the sake of me, I cannot hit/catch/see/touch/reach/find concerned issues when I'm inside a Version Released trigger. I always get "No actions performed".

Do you have some light to shed please? Once I get this working I can work my way further but for now I can't even cross the start line.

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 14, 2024

When releasing the version with the dialog and selecting "Move unresolved issues to..." another version, that removed the released-version value from the Fix Version field.  Once the rule triggers, only the "fixed" / completed issues can be branched over in the rule.

I recall from a different community question that using the "Ignore unresolved issues..." in the release dialog created other problems for version management and rules.

 

To do what you describe wanting, a rule would need to run before the release happens to check the label (or other conditions), and then remove any specific fix version values.

Suggest an answer

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

Atlassian Community Events