How to use JQL to get a list of Xray tests from a list of stories attached to another parent issue?

Skye Booth March 18, 2020

Hi there! 

I have a parent issue - RM-XXX

RM-XXX has many Stories and Bugs linked to it, and each Story or Bug has a linked Xray test.

I am struggling to find the JQL to pull a list of the Xray tests so that they can be exported. 

Overview of links:

- RM-XXX

     - Linked Story 1

          - Xray Test 1

     - Linked Story 2

          - Xray Test 2

I need a query to use to pull all of the Xray tests. 

 

I know that I can pull a list of the linked stories using: "issuekey in LinkedIssue("RM-XXX")", but I don't know how to go one step further to grab all of the Xray tests. 

 

I appreciate any feedback or help!! 

 

2 answers

2 votes
Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 18, 2020

Hi Skye,

Sadly you cannot achieve the desired search using standard features on Jira, you must go for a third-party app instead. Using i.e. JQL Booster Pack you can type the following:

 

First find the way to retrieve desired Stories, i.e.:

project = "My Project" and resolution IS EMPTY and issuekey in linkedIssues("RM-XX")

Then you can use this as a subquery on linkedIssuesOf() function as shown below:

 

type = "Xray Test" AND issue IN linkedIssuesOf(' project = "My Project" and resolution IS EMPTY and issuekey in linkedIssues("RM-XX") ')

Note that this is just an exaple, you must tune your query to fit your needs

Using this app you can also query other issues relations, check:

 

References:

 

Hope this helps you to create awesome queries <3

Kind regards

0 votes
Skye Booth December 3, 2020

I was able to use the following steps to get what I needed with the available JQL in our instance of JIRA: 

1. run an initial query to return all of the stories that I needed to pull the Xray tests from:

issue in linkedIssues("RM-960")

2. Save this as a filter. I called it "RM-960 Stories"

3. Run a second query to get all of the Xray tests linked to the stories in the filter that I just saved

key in requirementTests("RM-960 Stories")

4. Add the Manual Test Steps (Export) column

5. Export at the top right in preferred way

Stephen Adcock March 17, 2021

this used to work for me but we went to the cloud version over the weekend, now this won't work... and it seems that the 'requirementTests' function does not work... 

see here: 

https://community.atlassian.com/t5/Jira-questions/JQL-getting-all-tests-covering-a-List-of-Stories/qaq-p/1127821

can anyone help?

i have spent a day+ looking for why this won't work for me, or a work around.

Rogério Paiva - Xray Xporter
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.
March 28, 2021

Hi @Stephen Adcock 

Currently, it is not possible to have Xray's JQL functions, due to the Cloud Architecture, which doesn't allow us access to the Jira Database, stopping us from creating JQL functions.

This is why the JQL functions we provide in Xray Server are not available in Xray Cloud.

If you need further help, please contact the Xray Support (http://xraysupport.xpand-it.com).

Kind regards,
Rogério Paiva [Xray Support Team]

Like Jonathan Santos likes this
Jeremy Cupps August 8, 2022

@Rogério Paiva - Xray Xporter So none of the functionality provided by Xray Server's JQL functions is available in Cloud, and there are no work-arounds?

Jeremy Cupps August 8, 2022

@Rogério Paiva - Xray Xporter Sorry, never mind. I found the answer you gave in this other question.

Suggest an answer

Log in or Sign up to answer