I'm working on a project to get the last unreleased version in our releases to assign to the fix version in a ticket when the code for the ticket is merged in github. I have serveral different releases in the project that go out every 2 weeks. I'd like to automate the process using Jira automation and smart values to accomplish this. The issue that I'm having is that I can't find a Smart Value that will provide me with the last unreleased version. When I use {{project.versions}} in my automation with a log action I can see all the versions, but when I use anything beyond that such as: {{project.versions.filter(released.isFalse).last.name}} or {{project.versions.filter(released.isFalse).name}} I get nothing. My conditions are working fine (project = "L3", Issue type is in ("Story", Bug, etc) and fix version is empty.
I have a custom field called "Release Group" that is set for each ticket so that an if/then/else statement is checked on that value. If the value is "AdminTool" it will hit that condition and then look to set the fix version for the ticket to the "AdminTool.*" release. But as you can see in the screen shot attached, the smart value for the specific release isn't coming back.
This is my smart value for Unreleased: Unreleased value: {{project.versions.filter(released.isFalse).value}}
I also have : AdminTool Unreleased: {{project.versions.filter(released.isFalse).filter(name.match("^[Aa]dmin[Tt]ool.*"))}}
None of these return a value. I've tried other smart value combinations from ChatGPT, but none of those work as well. Any help in getting the proper smart value for the latest unreleased version based off a partial name of the release would be helpful
Thank you.
Hello @Steve Gilliard
Can you post screen images showing your entire rule, please?
In the absence of that, while this post is not exactly the same scenario you may find the information provided by @Bill Sheboy to be helpful.
Trudy, This is what I have for the rule. The issue is with getting the unreleased versions so that I can pick the correct one for the group that the ticket needs to go into. I'm not getting much help looking for the correct way to get unreleased versions from searching the internet. I look at that posting as well. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So this works: {{#issue.project.versions}} {{#not(released)}} {{#name.startsWith("AdminTool")}} {{name}} {{/}} {{/}} {{/}} it gives me a string of releases that aren't released and then I convert this into a list. Once I trimmed the string correctly in the split it worked. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your smart values return nothing because Jira Automation does not treat project.versions as a full list of version objects, so filters like released or name matching do not work. A more reliable approach is to use project.versions.unreleased.last.name to get the newest unreleased version, or project.versions.unreleased.filter name startsWith AdminTool .last.name to target a specific release group. If ordering matters, you can sort unreleased versions before taking the last one. Test each step with log actions, then apply your name filter once you confirm the values appear.
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.