Hey,
the trickiest automation I've seen till now ...
Could help?
I'm trying to fulfill this conditions:
If all linked Epics has the fixVersion for quarter set, add latest for UberEpic.
If any of the Epic has missing fixVersion for quarter, remove quarter from UberEpic.
I got to situation where automation can
1. find find UberEpic
2. check if all linked Epics have fixVersion with pattern using 'related issue condition' with JQL: issueFunction in linkedIssuesOf('{{issue.key}} and issueLinkType = "Is a Parent of" ') AND issuetype = Epic
tricky part:
3. find latest quarter from all fixVersions in linked Epics?
could I use 'Create Variable' with some magic in it?
that's my current state of rule:
Hi @Michał
Without seeing your entire rule and audit log details for context...
Have you tried using the max function on the list of fixVersion's date attributes to find the last one:
Kind regards,
Bill
Hey @Bill Sheboy
direction is very good. Is there a way to create a list of fixVersions from multiple issues? Or iterate every issue from jql :)?
Automation should find max of versions in all children of issue.
Thank you for your fast answer! I'll put schema tomorrow.
Thank you
Michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The answer depends upon what you want to do with the result, and which attributes of the version to access. Seeing the specifics of your rule will help suggest more ideas.
With multiple versions assigned to each issue, this can get messy fast, and so you may need to experiment to learn how possible this scenario is.
For example, using list iterators, all of the fix versions spanning multiple issues could be concatenated into a single CSV list, split back into a list, reduced with distinct, and then filtered to one value with max on the release date attribute...storing that in a created variable. Then that variable could be used to create another variable for a dynamic match() expression, which is finally used with in-line iteration to get the desired version.
I am using Jira Cloud, not Data Center, and so I cannot test how much of this is possible with that version of automation rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am unclear about that rule...regardless, assuming the issues are in a Lookup Issues result, here is how to find the maximum release date:
{{lookupIssues.fixVersions.releaseDate.join(",").replace("[","").replace("]","").split(",").distinct.toDate.max.jiraDate}}
How this works:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Bill Sheboy ,
with lookup it was really easy to find related issues. And with your smart values snippet I was able to get list of fixVersions or it's dates. I already owe you a beer!
with this I get dates: {{lookupIssues.fixVersions.releaseDate.join(",").replace("[","").replace("]","").split(",").distinct}}
and with this I get names: {{lookupIssues.fixVersions.name.join(",").replace("[","").replace("]","").split(",").distinct}}
functions todate, max, or jiradate:
toDate.max.jiraDate
does not give anything on output that could be printed to log.
when I'm trying to use update JSON (watch in other thread where you helped!) I get information it's not valid fixversion Name.
How would you get proper name from list having list of dates? Or handler to right version I could use further?
I can get list: maxVersion
Thu Jan 01 01:00:00 CET 2026, Wed Apr 01 02:00:00 CEST 2026, Wed Jul 01 02:00:00 CEST 2026, Wed Apr 01 02:00:00 CEST 2026
or version names: maxVersion DUN 2025 Q4, DUN 2026 Q1, DUN 2026 Q2, DUN 2025 Q3, DUN 2025 Q4
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Short answer: I am stumped on this one, and I recommend working with your site admin to ping Atlassian Support to learn what they suggest, at this link https://support.atlassian.com/contact/#/
More information...
As I noted earlier, I am using Jira Cloud, and so there are likely differences with the behaviors you see in Data Center. With that disclaimer out of the way...
Although we were able to find the max release date, I was not able to figure out a way to filter further to get at the version's id value, which is what is needed to set the fix version. The reason (at least for Jira Cloud) is the release date values are date-only values without a time. I could not find a way to format that value to match what releases appear to store in a full list of versions, such as:
Tue Feb 06 00:00:00 UTC 2024
The time component is the problem. Conversion attempts always add a non-zero hour component, even when forced to the start of day.
And so without an ability to match the release date, the id cannot be found.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Update...this one was bugging me, so I kept looking at it to find an approach that works for Jira Cloud. If it works for Data Center, awesome...although I expect the regular expression may need tuning.
Let's assume we have the maximum version date in a created variable, named varMaxReleaseDate.
We then create a dynamic, regular expression for use with the match() function. That will be named varMatchExpression and contain this:
(id=.*releaseDate={{varMaxReleaseDate.toDate.format("EEE MMM dd").concat(" 00:00:00 ").concat(varMaxReleaseDate.toDate.format("zzz yyyy"))}})
That will match version records which have the date / time format I noted earlier by defaulting the time value.
Finally that can be used to get the single, version id value for selection:
{{lookupIssues.fixVersions.join("~~").replace("\n", " ").split("SmartVersionBean").match(varMatchExpression).match("id=(\d++)").distinct}}
The parts that originally stumped me were removing newlines from version descriptions and curly brackets cannot be used in a dynamic regular expression in rules. The respective solutions were to replace the newlines and ignore the brackets by splitting on the text "SmartVersionBean".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey Bill,
thanks for you help. It's to complex for me due to lack of sorting list and getting version handler. I decided to do this automation with script outside Jira.
thank for your help and KUDO!
Michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Michał - unfortunately I do not have an answer to your question. However, curious where you got the issuetype UberEpic?
I would love to utilize this issuetype as linking Epics to a master project would be very beneficial.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @jas ,
in big Jira project of big Organization of name I shouldn't share publicly. UberEpis is just my 'code name'
This is just another Issuetype - you can create number of 'custom' issuetypes. It would better to use 'Jira portfolio' hierarchy with 'Initiatives' instead but I need some time to fix this and other config issues in this particular project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, that makes sense. I finally ran across an article that mentioned "initiatives," I will take a look at that.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no problem,
it can be really challenging to tailor everything right and make it work smoothly :-) every company I join there is really much to let all work easier in more automated way
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.