Forums

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

How to find all Zephyr test cases linked to a Jira ticket key via Rest API

M Bleyer June 24, 2024 edited

Given I have a Jira ticket key (e.g. "PROJECTNAME-1234"), how can I find all Zephyr test case items that are linked to this ticket, e.g. via traceability tab in Zephyr plugin, by using a Rest API call?

What I am currently using is

/rest/tests/1.0/testrun/search?fields=id,key,name,folderId&query=testRun.projectId+IN+(12345)+AND+testRun.folderTreeId+IN+(654321)+AND+testRun.keyName+LIKE+"FINDME"+ORDER+BY+testRun.name+ASC&maxResults=40&startAt=0&archived=false

but there is no parameter option for the Jira ticket key (if any) that is linked - does such a parameter exist?

2 answers

1 accepted

0 votes
Answer accepted
M Bleyer July 8, 2024

I reverse engineered it, essentially it can be done with

 

/rest/tests/1.0/testrun/search?fields=id%2Ckey%2Cname%2CfolderId%2CiterationId%2CprojectVersionId%2CenvironmentId%2CenvironmentIds%2CtestCaseCount%2CissueCount%2CcustomFieldValues%2CcreatedOn%2CissueId&query=testRun.projectId%20IN%20%2812345%29%20AND%20testRun.folderTreeId%20IN%20%28123454%29%20ORDER%20BY%20testRun.createdOn%20DESC&startAt=0&maxResults=40&archived=false
0 votes
Gip June 25, 2024

Hi @M Bleyer - Which Zephyr product (Squad, Scale or Enterprise) are you using with your Jira DC? And is this a Cloud or Server instance?

M Bleyer June 27, 2024

Jira server v9.12.8
Zephyr Scale

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, rovo agent workshop, rovo workshop series, build rovo agent, atlassian intelligence, ai agents, rovo in action, automation agents, ai for teams, atlassian learning, rovo development, agent building tutorial

[Workshop Series] Let's build a Rovo Agent

AI-curious? This series walks you through building Rovo Agents step by step, no matter your experience level. Multiple workshops available throughout October and November!

Register now
AUG Leaders

Upcoming Jira Events