I have a custom variable called Assigned Team. I want to write a jira query that limits the results to only when Assigned Team is not equal to itself for a particular linked dependency.
Here is my starting point. This will provide me with the stories and bugs for each of the teams that have a particular inner dependency of "is Blocked by" and "dependent on". How to I create the join to combine this list with the issue's outer dependencies but not include those where the assigned teams from the joins is equal,
"Assigned Team" in ("Team1", "Team2", "Team 3") AND issueLinkType in ("is blocked by", "Dependent On") and Status not in (closed, "Pending Release") AND issuetype in (Bug, Story)
Hello
To achieve this, you can use a JQL query with the appropriate syntax to exclude results where the Assigned Team is equal to the assigned team of linked issues. Unfortunately, JQL does not support direct comparison between fields of linked issues out of the box. You would typically need to use an add-on like ScriptRunner for advanced JQL functions.
Here is a simplified starting point using basic JQL:
```
"Assigned Team" in ("Team1", "Team2", "Team 3")
AND issueLinkType in ("is blocked by", "Dependent On")
AND status not in (closed, "Pending Release")
AND issuetype in (Bug, Story)
AND issueFunction in linkedIssuesOf("project = YOURPROJECT and 'Assigned Team' != 'Team1'", "is blocked by")
```
You would need to adjust the `linkedIssuesOf` function to match your specific conditions. Note that this example assumes you have an add-on like ScriptRunner installed. If you do not have access to such add-ons, you might need to handle this logic outside of JQL, such as via a script or reporting tool.
Regards
Nikki Harris
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.