Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How can I check if a list of fix versions is included in the list of all versions in a project

We use an automation to move issues from a state "ToBeReleased" to done once the fixVersion of the ticket is released. That so far is all straight forward, now I wanted to extend that functionality for tickets that have multiple fixVersions. They should only be moved if all versions are released.

{{issue.fixVersions.name}} gives me the list from the issue

{{project.versions}} gives me the list from all project versions

If I check for a single version like this {{#project.versions}} {{#if(equals(name,"**** 1.2.6"))}}{{name}}{{^last}},{{/}}{{/}}{{/}} I get the one value shown if it is included.

I thought now I can just do a For Each Branch on {{issue.fixVersions.name}} and compare the names one by one but I dont know how to access the single version names there to check if they are included.

Can anyone point me in the correct direction, maybe also there is an easier way to achieve what I want? Thanks in advance

1 answer

1 accepted

0 votes
Answer accepted
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 16, 2023 • edited

Hi @Thomas ,

If I understand it right, you want to transition an issue when all versions mentioned in an issue have been released.

I don't think you need to use the project smart value. What you can do is:

Trigger:

Version is released

Bran rule JQL:

JQL: fixVersion in ({{version.name}})

Disable checkbox 'Only include issues that have changed since the last time this rule executed'

Within the branch:

create a variable component with:

Variable name: releaseOfIssuePossible
Smart value: {{issue.fixVersions.released}}

Next a advanced compare condition:

First value: {{releaseOfIssuePossible.match(".*(false).*")}}
Condition: equals
Second value: empty

Next a transition component:

Transition to 'Release' (or whatever the next status is called)

 

This should transition all issues where all fixversions are released. All other issues will not be transitioned. I personally would opt for adding a comment that version X has been released which contains the issue.

I hope this helps.

Thanks a lot, I will try it later

Like Rudy Holtkamp 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.
Nov 16, 2023

Hi @Rudy Holtkamp 

Won't that match() function in the advanced compare only find "false", or unreleased states...and then try to compare that to "true"?

What if instead the advanced compare did this:

  • first value: {{releaseOfIssuePossible.split(", ").distinct}}
  • condition: equals
  • second value: true

The first value splits any release states into a list, returns one distinct value for each possible one, and then only proceeds if one-and-only-one "true" was returned.

Kind regards,
Bill

Like # people like this
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 16, 2023

Hi, I see my mistake.

It should be:

First value: {{releaseOfIssuePossible.match(".*(false).*")}}

Condition: equals empty

 

Which translates to: when there are no unreleased versions which are mentioned in the issue.

Like # people like this

Hi, I now implemented it like described but there seems to be an issue with the JQL:


Error searching for related issues. This is most likely because the following issues don't have a related issue of the type you specified. Try narrowing your search to only include issues that contain links to related issues:
NO ISSUE: "(fixedversion in (AutomationTest0.0.1)) AND (project in (10038))" - Field 'fixedversion' does not exist or you do not have permission to view it.
I tried with different values like "version", "fixVersion", fixedVersion" but always the same error.

 

Screenshot 2023-11-16 at 19.59.36.png

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 16, 2023

Should be fixVersion

Does it work in the UI?

Is the version released part of the project (10038)?

If not you need to change the automation rule scope 

I would like to reply faster but this page always gives me weird error messages:

You may have recently posted the same thing elsewhere on the community. Update your text, or wait before reposting.

With fixVersion it's working, exactly that variant I did not try...

Thanks a lot:

Screenshot 2023-11-16 at 20.42.56.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events