JIRA – Finding Outstanding Issues and Their Outstanding Blockers

Say you have three projects in JIRA (let’s call them AAA, BBB and CCC). Now there might be a situation where you have issues in project AAA which are blocked by issues in project BBB or CCC.

So what would the necessary JQL query look like which would return all of the issues which are outstanding across all of the projects necessary to deliver project A.

Fortunately this kind of thing can be done with the freely available Script Runner plugin. This provides a number of scripted JQL functions which can be used to construct more complicated queries for returning more detailed information.

So the query which I came up with looks like this:

(Project = AAA AND Status NOT IN (Closed, Resolved)) OR (Project IN (BBB, CCC) AND Status NOT IN (Closed, Resolved) AND issueFunction IN linkedIssuesOf("Project = AAA", "is blocked by")) ORDER BY status

Explanation

This breaks down into two parts separated by the OR clause. This first one returning all of the issues in project AAA which are outstanding:

Project = AAA AND Status NOT IN (Closed, Resolved)
The second part:
Project IN (BBB, CCC) AND Status NOT IN (Closed, Resolved) AND issueFunction IN linkedIssuesOf("Project = AAA", "is blocked by")
Is made up itself of three components:
  1. The first part limits the search of blockers to only those within the BBB and CCC projects:
    Project = AAA AND Status NOT IN (Closed, Resolved)
  2. The second part takes those issues and only looks at those which are not Closed or Resolved
    AND Status NOT IN (Closed, Resolved)
  3. The third part searches Project AAA for issues which have the is blocked by link and returns the issue which is linked to:
AND issueFunction IN linkedIssuesOf("Project = AAA", "is blocked by")
Combining these three together gives the open issues which are blocking issues in project AAA.
Of course you could also extend this part of the query to also specify the various aspects of the search for blocker issues.
Advertisements

One thought on “JIRA – Finding Outstanding Issues and Their Outstanding Blockers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s