JIRA Query to pull linked defects for all stories assigned to a sprint.

Kumar Chellappan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 8, 2024

I want to pull data to compare the number of stories assigned in a sprint Vs no of defects raised and linked to those stories. Is there a way i shall write a JQUERY to pull all linked defects for all of the stories assigned to a sprint?

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 8, 2024

Hello @Kumar Chellappan 

Welcome to the Atlassian community.

If you have only native Jira JQL capabilities at your disposal then your requirement cannot be met in a single query.

The linkedIssues() function will give you the issues linked to a single, explicitly identified issue. The function cannot be used to get linked issues for multiple issues at once.

https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#linkedIssues--

You would need to execute one query to get the list of stories assigned to the sprint. Then manually build a second query with multiple instances of the linkedIssues() function (one per story) to get the default linked to those stories.

There are third party apps that extend JQL capabilities that could help you with this. For instance the Enhanced Search app provides a linkedIssuesOf() function where you can supply a filter to select the issues for which you want to get linked issues; i.e.

issuetype=Bug and issuefunction in linkedIssuesOf("issuetype=Story and sprint='Your sprint'")

Optionally you can add a link type as a second parameter in the linkedIssueOf() function.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events