This chapter provides information about custom JQL functions available in RTM.
RTM extends Jira’s built-in query language with custom functions that let you search issues based on their location in RTM folder trees. You can use these functions anywhere Jira accepts JQL — the issue navigator, saved filters, board filters, or dashboards.
RTM provides three JQL functions:
Open the Jira issue navigator and switch to Advanced mode to type your query directly.
To find all test cases placed directly in the “Smoke” folder inside “Regression”:
key in testRepoTreeShallowSearch("Regression/Smoke")
To include everything inside “Regression” and all its subfolders:
key in testRepoTreeDeepSearch("Regression")
All prefix at the beginning of the path is optional — "All/Regression" and "Regression" return the same results.Add a comma-separated list of project keys as the second argument:
key in testRepoTreeDeepSearch("Regression", "PROJ1,PROJ2")
When you skip this argument, RTM searches across all projects it manages.
Use rtmTreeSearch to search Requirements, Test Plans, Test Executions, or Defects. The argument order is fixed: depth, projects, tree, and path.
Find all requirements in the “Core Features” folder and its subfolders in project PROJ1:
key in rtmTreeSearch("DEEP", "PROJ1", "Requirements", "Core Features")
Find all defects placed directly in the “Sprint 10” folder, limited to one project:
key in rtmTreeSearch("SHALLOW", "PROJ1", "Defects", "Sprint 10")
Use not in instead of in to exclude matching issues from the results:
key not in testRepoTreeShallowSearch("Deprecated")
Folder names, tree names, and depth values must match exactly as they appear in RTM.
"regression" will not match a folder named "Regression" — you will see a “Path not found” error.rtmTreeSearch must be SHALLOW or DEEP — uppercase only.Requirements, Test Cases, Test Plans, Test Executions, Defects.Jira limits each JQL clause to 1000 values. When a search matches more issues than this, RTM will not return a partial result. Instead, it shows an error asking you to narrow down the query or split it into pages:
To retrieve all results, add a page number as the last argument and combine the clauses.
For in queries, join pages with OR:
key in testRepoTreeDeepSearch("Regression", 1) OR key in testRepoTreeDeepSearch("Regression", 2)
For not in queries, join pages with AND:
key not in testRepoTreeDeepSearch("Regression", 1) AND key not in testRepoTreeDeepSearch("Regression", 2)
not in pages with OR. Because each page already matches almost all issues, combining them with OR silently returns nearly every issue in the instance.RTM automatically keeps saved filters and boards current. Whenever the tree structure changes — for example, when a test case is moved to a different folder — RTM pushes an update so the results reflect the new state without any action on your part.