JQL query to list of blocked issues

prabakar_m February 5, 2020

We have a story and the story has 'n' number of sub-tasks and each subtask may/may not linked issues (issue type = bug) is blocked by.

I need to frame the JQL query with below condition

1. List out all the subtask which have linked issues?.

2. Get the linked issues count of each sub-task wise? 

3 answers

0 votes
scott_lake January 23, 2023

I'm writing a snag that actually blocks a long list of issues that we didn't think of ahead of time.  Is there a way I can make a JQL query where the outcome of issues can be copy /pasted into the blocked issue field when I create the snag?

0 votes
CelesteCS March 4, 2020

Hi,

There is a number of JIRA plug-ins, which provide a JQL function for your case:

We are the vendor of the latest one, so feel free to ask any question regarding it.

Thanks!

0 votes
Ignacio Pulgar
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.
February 6, 2020

Hi @prabakar_m 

The first query requires the help of a third party app like ScriptRunner for Jira Cloud, thanks to the hasLinks() function:

issueFunction in hasLinks("is blocked by") AND type = Sub-task

The count of linked issues for each subtask is even trickier to obtain on Cloud. Maybe you can export to csv using the semicolon character (;) as a separator and open the resulting file with a spreadsheet tool (ie: Excel) and use one of its functions to obtain the desired numbers.

Alternatively, your two purposes could be covered by Structure Cloud app. I've just used the Server version, but even if it counted with half its features, it would be definitely worth it.

Hope it helps.

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 6, 2020

Hi Prabakar,

I can confirm that the query provided above is for ScriptRunner for Jira Server and will not work with ScriptRunner for Jira Cloud due to the differences in the plugin which you can see in the documentation page located here

I can confirm that in ScriptRunner for Jira Cloud that hasLinks is a JQL keyword as described here and on this page you will see examples of how to use this keyword to search for issues which have links.

I hope this information helps.

Regards,

Kristian

Like Ignacio Pulgar likes this
Ignacio Pulgar
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.
February 6, 2020

Suggest an answer

Log in or Sign up to answer