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