Forums

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

Rewriting Xray JQL function testExecutionTests for Cloud

Pavol Gocal
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!
June 22, 2026

Hello,

we are using Xray in Jira DC. Planning migration to Jira Cloud. In DC version, we use JQL function “testExecutionTests”. For example: issue in testExecutionTests('issuekey', ‘PASS’).

How can we rewrite this functionality for cloud, so the JQL logic for returned issues is the same?

Based on documentation https://docs.getxray.app/space/XRAYCLOUD/44565225/Enhanced+Querying+with+JQL there are 4 JQL functions available, but not sure how to accomplish the same result as with JQL from DC, mentioned above. DC compatible JQLs are in beta testing.

We are using these JQL functions inside scriptrunner scripts, where we have multiple JQL queries defined and executed to search for issues.

Thank you for your help.

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Germán Morales _ Hiera
Atlassian Partner
June 22, 2026

Hi @Pavol Gocal , there's no Cloud equivalent of testExecutionTests; the DC-parity functions are still beta and PASS isn't a native Jira field, so do it through Xray's GraphQL API from your ScriptRunner code:

  • Query the execution with getTestExecution, or getTestExecutions(jql: ...) for several at once.
  • Read each test and its run status, keeping the keys where status is PASS, and page with start/limit since GraphQL returns at most 100 per call.
  • Feed those keys back into your search as issue in (KEY-1, KEY-2, ...).

Same result set as issue in testExecutionTests('KEY','PASS'), just resolved through the API. ScriptRunner example: getting Xray tests from a Test Execution.

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events