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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.