Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,644,306
Community Members
 
Community Events
196
Community Groups

How do I filter issues that are blocked in JQL

Edited

Hi All, I'm trying to write a JQL filter to only show me issues in a project that block other issues however when I run the query ...

project = XX AND resolution = Unresolved AND Flagged = Impediment AND issueLinkType = "blocks" ORDER BY priority DESC

...I also get issues back that are not blockers, but are blocked by other issues. Can anyone explain why?

4 answers

1 accepted

1 vote
Answer accepted

The problem is that issueLinkType supports both inward/outward directional names (blocks, is blocked by) and the link type name (Blocks).  This is a problem because JQL is not case sensitive.  So if you want to search for "blocks" and not "is blocked by", you can't do that.  This is a serious limitation because you can't rename the Blocks link type in Jira Cloud, Jira will just make a new Blocks link type and you will have two directional link type options of blocks/is blocked by in Jira.

See also:

https://community.atlassian.com/t5/Jira-Software-questions/JQL-for-issueLinkType-quot-blocks-quot/qaq-p/1232889

https://jira.atlassian.com/browse/JSWCLOUD-20736

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 07, 2019

Hi Chris,

I think I understand the confusion here.  The issueLinkType is a relatively new JQL function, only available since Jira 8.0.0.  This will return to us any issue that has a link of that type.  However it does not tell us anything more about the linked issue itself.

The only reason I can think of as to why you might get JQL results for this query that do not appear to actually have a 'blocks' type link, is that your account in Jira does not have permissions to see the issue that this issue is linked to. 

When that happens, your account won't see the link itself, but the issue still does have at least one link of that type to another issue.  This could be as simple as lacking the Browse permission in that other project, or it could be more complex and be restricted by a security scheme, in which case you might have the project permissions, but lack the security level needed to see that linked issue.  Either way, it is possible that your JQL query can return issues that appear to you to have no such links of that type.

As for how you figure out what that issue might be, well that gets harder to do.  If you are not a Jira admin, I would recommend reaching out to your Jira admin to see if perhaps they get back some more details about the link type on that issue.  Then again, they might not want to reveal that data to you, but they could likely confirm that this is the situation at least.

I hope that helps to explain this behavior.  Please let me know if you have any concerns about this.

Andy

Thanks Andy, I'll give that a try

0 votes
Muhammad Ramzan(Atlassian Certified Master)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Sep 16, 2019

@chris I tested your query and it worked fine and only returned those issues which blocking other issues. 

 

Try to index your jira 

Strange, I'm trying to think what could be different about my setup

0 votes
Gezim Shehu [Communardo]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 16, 2019

You can use something like this

project = XX and resolution = Unresolved AND Flagged = Impediment and issueFunction in hasLinks(blocks)

Thanks, does this solution work without ScriptRunner though? I was hoping to avoid using it

Gezim Shehu [Communardo]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 16, 2019

Unfortunately this exact syntax is applicable only for SR

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events