You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am trying to write a JQL query to filter blocking issues for a specific project. So far I have:
project = "Project Name" AND issuelinktype = blocks
However, the results show both blocking issues and issues that are "blocked by". I would like the filter to only show the blocking issues and exclude the "blocked by" issues. Any advice?
Hey @Ammaar Ahmed
please have a look at your issue link configuration. By default, the issue link type "blocks" has the name/description "blocks" and the outward description "blocks". I'm pretty confident that the JQL function looks at the description value as well. So try a different name for it. I tried this once but also had to recreate some issue links. Indexing seemed a bit off but after that I really only got the right results returned.
Please let us know if that solved your problem. :)
makes sense to me and I just tried to explain to you why you get the wrong results returned with your JQL filter. Do you notice the "Name" and "Outward Description"? That's causing the behaviour and feel free to change the configuration to fix it for you. :)
Thanks @Max Foerster - K15t ,
The fix worked! Now I have set up some JQL queries on the board to indicate colors for the issues that are blocking (red) and the issues that are blocked by (blue), for better visual management. I am almost there, the only thing I am trying to figure out is I want the color for a "blocked by" issue to go away when the corresponding blocking issue is resolved. Any suggestions on JQL for this? Right now I have:
project = "Business Intelligence " AND statusCategory != Done AND issuelinktype = "is blocked by"
I am on Jira Cloud.
Sooo maybe someone is still looking for the solution. Short answer: change the name of the link from "Blocks" to something else like I did "Issue blocks" and then the JQL
issueLinkType = "blocks"
returns issues only with outward link type "blocks"
The solution is provided in Atlassian documentation here.
What we use to identify blocker links is the following:
issueFunction in linkedIssuesOf("key in (JIRAKEY-XXXX) and status not in (closed, done)") and project = "PROJECT ID" and issuetype in (bug,incident) AND status not in (closed,Done) AND issueFunction in hasLinks("blocks")
@lenII tried your suggestion and received this error message:
Your JQL includes the [hasLinks] function from the [Adaptavist Scriptrunner] app for Jira Server. This function works differently in Jira Cloud. Refer to https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions for details.