Guide · Jira Cloud · JQL

How to find circular dependencies in Jira

A circular dependency is a loop of "blocks" links: A is blocked by B, B is blocked by C, and C is blocked by A. Every issue in the loop waits for another one, so none of them can start. Jira does not warn you, and the board still looks normal.

Step 1: list every open issue that is waiting on something

Run this JQL in the issue search (replace KEY with your project key):

project = KEY AND issueLinkType = "is blocked by" AND statusCategory != Done

"is blocked by" is the default name of the inward side of Jira's Blocks link type. If your site renamed it, use your own name.

Step 2: follow each chain

For each issue in the list, ask Jira what blocks it:

issue in linkedIssues("KEY-34", "is blocked by")

Then run the same query on the issue you get back, and so on. If the chain comes back to the issue you started from, you have found a loop.

A real example

We ran these two queries on our 390-issue demo project. Following the chains gives two loops:

DEMO-34 is blocked by DEMO-38, which is blocked by DEMO-36, which is blocked by DEMO-34.

DEMO-60 is blocked by DEMO-64, then DEMO-63, then DEMO-61, which is blocked by DEMO-60.

Seven issues are stuck, and nothing on the board shows it.

Why this does not scale

Standard JQL cannot detect a loop on its own: it only shows one link at a time. On our demo project, the query from step 1 already returns more than 50 issues, and each one needs its own chain to be followed by hand.

How to break a loop

Or let a health check do it

Link Healthcheck follows every chain in one scan and lists each loop as a critical finding, with the issues involved. On the demo project above, it found the same two loops in seconds.

Install free from Atlassian MarketplaceFree for teams up to 10 users

Disclosure: we build Link Healthcheck. The JQL method above works without any app.