The main objective is that I want to sum points for tickets in an epic, and assign that to the epic Story Points field.
However, my project uses components to separate tickets by platform… I want to take the sum of the platform that has the most overall points, and assign that to the epic.
Basically, I want to use lookupIssues, group the results by component, and use `MAX()` to get the largest sum. But the aggregation part has proven difficult to figure out!
Welcome to the Atlassian community.
I don't know how many components you've got - but here's one potential approach if it's a manageable number ...
Do a lookup using JQL for the data sets for each of your components and create a smart variable for each total of story points - e.g. ....
Lookup issues based on JQL #1 ...
"project = XYZ and component = ABC and "story points" is not empty"
+ Create variable LUA = {{lookupIssues.story points.sum}}
Lookup issues based on JQL #2 ...
"project = XYZ and component = DEF and "story points" is not empty"
+ Create variable LUB = {{lookupIssues.story points.sum}}
Lookup issues based on JQL #3 ...
"project = XYZ and component = GHI and "story points" is not empty"
+ Create variable LUC = {{lookupIssues.story points.sum}}
You can then find the maximum from each of the smart value variables ...
create variable MyMAX = max(LUA, LUB, LUC)
Then you'd edit the Story points value for the required Epic and add the MyMAX variable.
Obviously, someone else may have a smarter solution - but hopefully this helps.
Thanks,
Tim C
That does indeed work, thanks @Tim C
I do wish there was a more "future proof" way to do it so it doesn't have to be maintained quite as closely if new components were added or something. 😁
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Aidan Follestad -- Welcome to the Atlassian Community!
Have you considered having different epics (and so with different component values) for each platform? That would eliminate the need to determine the maximum sizing / sum by platform.
Without knowing your Jira version (Cloud, Server, or Data Center) I wonder if you could relate the platform-scope items with other issues using the hierarchy or linkages. For example with Jira Cloud, using Ideas in Jira Product Discovery (JPD) to span them.
If not...
A variation of the approach suggested by Tim is to use a single call to Lookup Issues to gather the stories, and then use smart value, list filtering to build a Lookup Table, with one row for each component possible. The only maintenance would be to add / remove rows from the table when components change. The rule itself would only be a few steps (5-6). If you are interested in learning more about that approach, please let me know.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.