Hi,
I am trying to make a JQL that will give a list of issues that have a "Is Blocked By" ticket in it across multiple teams where the issue that is blocking does not belong to the team of the issue which is blocked.
Its main use will be during PI planning to provide oversight into all blockers on a single list so we can better schedule work.
I am able to do this at the Team level by the following code:
(From what I've tested it appears to provides correct results=list of all items that belong to epics with the current PI labels assigned to them that are blocked by issues belonging to other teams):
NOT (status = Released OR status = Closed) AND Project = Project_Name AND Team = "Team Name" AND
(issueFunction in hasLinks("is blocked by") AND
issueFunction in linkedIssuesOf("NOT(status = Released OR status = Closed) AND Team != 'Team Name'", blocks))
AND (issuefunction in linkedIssuesOf("Filter = 137412", "is epic of") OR Filter = 137412)
(Note: The filter is a grouping of Labels. I originally had it as shown codeblock below but to make it easily to update per PI placed in a filter)
linkedIssuesOf("labels in (PI-2-Commitment, PI-2-Stretch)", "is epic of")
I know that I could simply make a very long query where I combine the code above per team. But, I've got ~20 teams and over the year sometimes new teams come to be, sometimes they merge etc. So would like a cleaner more dynamic solution.
How can I pass the Team Name from inside HasLinks to a condition outside of it? Or make an If Statement? Or use some clever filter setup