JQL for linked work items and blockers
Short answer
Open work that is blocked by something:
issueLinkType = "is blocked by" AND statusCategory != Done
issueLinkType matches the link description as it reads from this work item's side, so the same link shows up as "blocks" on one side and "is blocked by" on the other.
Queries you can paste
| You want | JQL |
|---|---|
| Open work that blocks something | issueLinkType = blocks AND statusCategory != Done |
| Anything with a blocking link in either direction | issueLinkType in (blocks, "is blocked by") |
| Everything linked to one work item | issue in linkedIssues(KAN-1) |
| Linked to one work item by a specific link type | issue in linkedIssues(KAN-1, "is blocked by") |
| Open work with no links at all | issueLinkType is EMPTY AND statusCategory != Done |
| Duplicates to clean up | issueLinkType = duplicates ORDER BY updated DESC |
Replace KAN-1 with a work item key from your site. Link type names are per site; check them under Settings, Work items, Work item linking.
What JQL cannot do with links
- "Blocked by something still open."
issueLinkType = "is blocked by"matches the link even when the blocker is already Done. JQL cannot filter on the status of the linked work item. - Counting links. There is no link count field, so "blocked by three or more" is not searchable.
- Nested queries.
linkedIssues()takes one work item key, not a query.
For those, a scripting app or a field that stores the count is needed.
Want the rest? The Jira Cloud JQL Cookbook has 66 copy-paste queries for triage, sprints, releases, SLAs and reporting, each one validated on Jira Cloud. Get it on Gumroad, pay what you want from $12.