We have ChangeManagement tickets that go through peer reviews and CAB on their way to a release. The CM ticket has links to the Epics included in the release. My A4J rule is triggered when a CM transitions to CAB Review status.
The first lookup action steps has the following JQL:
key in linkedIssues({{triggerIssue.key}}, "is caused by")Which I then use to populate a variable releasedEpics
{{#lookupIssues}}{{key}}{{^last}}, {{/}}{{/}}
Further on I have another lookup action step
parent in ({{releasedEpics}}) AND project not in (ALF, CM, SD, CDD) AND category = "System Layer" AND statusCategory = DoneThis gives me all the tasks the developers worked on in each of the epics linked to the CM for the release.
From that 2nd lookup I want to extract the sprints that the tickets were in. Ideally, I'd like to see which delivery team (set in the Delivery Stream field), required the most sprints to deliver their dev tasks.
I have tried a few things with MAX() to no avail (no data at all)
I also tried to get fancy with this one and got no data either
{{#lookupIssues.customfield_10109.value}}{{sprint.distinct.size}}{{/}}The following at least gives me a total count of sprints across all teams (e.g. 27) and a list of all the sprints or the unique groups of sprints the issues had. In the later I can see where some tasks took multiple sprints to resolve, but because this result is an array, there are individual sprints mentioned multiple times in different elements of the array. Example as follows:
[MH Sprint 77 ], [MH Sprint 78], [MH Sprint 79], [MH Sprint 80], [MH Sprint 77, MH Sprint 78], [MH Sprint 78, MH Sprint 79, MH Sprint 80], [MH Sprint 79, MH Sprint 80]
Because .size counts the elements in the array, this produces a result of 7.
I could read through that to find the unique sprints for each team, but the result I would like to see is number of individual sprints, which is 4 (sprints 77, 78, 79, and 80).
{{lookupIssues.sprint.distinct.size}}
{{lookupIssues.sprint.distinct.name}}
What I'd really, really like to see is that of all 95 tasks in the epics delivered, team Bowie took 4 sprints to deliver their tasks, team Zappa took 2 sprints, Team Grohl took 1 sprint, etc.
Does any clever individual want to suggest how I might achieve either of those desired outcomes?