Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to return issue links and for each, their issue links in Jira API

danut.moraru@envestnet.com
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!
March 12, 2021

I have an epic that links in "is tested by" to a bunch of test cases, and each test case may have bugs that blocks it in its "is blocked by" issue links.

I can get the list of test cases that have at least one blocking bug, but not the IDs of those bugs

issue in linkedIssues(epicID,"is tested by") AND issuelinktype in ("is blocked by") 

I can list the blocking bugs for all my test cases, but not what test case each blocks

issueBlocks in linkedIssues(epicID,"is tested by")

How can I query all this info in a single shot without multiple trips over the wire? Since issue links are multi-valued, I need either a flat table that lists a test case multiple times and has a a separate value for each bug in 'blocked by' column, or using some GROUP BY logic a hierarchical table that lists separate lines for blocking bugs for each test case that has blocking bugs. Thanks 

 

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 15, 2021

Hello danut.moraru@envestnet.com ,

Thanks for reaching out, and for this one you would need to build out a script to parse out the results of an initial call, then pass the linked issues data into a second call for the follow-up information from that linked issue.

there is a pretty good example of doing a multiple part call in the following thread from the Developer community that would be a good starting point:

Alternatively, you could also look into a third-party tool to allow nesting queries, that would allow you to write up a JQL to display this information, I found the following thread showing how to get the Linked issues hierarchy using the extended JQL in ScriptRunner:

You could then use this nested JQL function from the tool in conjunction with a "GET /rest/api/3/search" to display the details via a single call.

Regards,
Earl

Suggest an answer

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

Atlassian Community Events