Custom Data Queries

Several system queries are provided for you to view different groups of requirements, test cases, test runs, and defects. However, you can also create your own queries to return results based on your specific criteria. You can create a query using either of the following methods:

  • Create a brand new custom query from scratch

  • Copy a system query and modify the query to include your own criteria

Create a new custom query

Use the following procedure to create a new custom query. As an example for the procedure, suppose you want to define criteria for a query that returns all test runs that are assigned to you and are a priority of High.

Available values are based on the object that you are querying. For example, Approved is available as a query criteria for test cases but not for defects.
  1. In the Data Query feature, click the My Queries folder on the side panel.

  2. The New Query screen appears. In the Query Name field, type a name for your new query, such as "My High Priority Test Runs".

  3. Make entries in the following fields to define the first clause for your query.

    • Criteria. Select Assigned To as the criteria item.

    • Operator. Select = (Equals) to indicate that the criteria should equal a certain value.

    • Value. Select your user name as the Assigned To value.

  4. Click Add New Clause to add an additional line for a new clause. For this example, make the following entries for the second clause of your query.

    • Group. Select and to indicate that the results of the query should match both criteria.

    • Criteria. Select Priority as the criteria item.

    • Operator. Select = (Equals) to indicate that the criteria should equal a certain value.

    • Value. Select High as the Priority value.

    You can delete a clause line by clicking the Delete icon in the Action column.
  5. Click Run Query to run the query. Query results display in the Query Result table once the query has processed.

  6. (Optional) Click Save Query to save your query in the My Queries folder.

    You can also select the Team Queries check box to add your new query as a team query.

Copy a system query

You can create a custom query by copying an existing system query. This method is useful when there is a system query that includes most of the criteria you want and only needs a few changes, allowing you to save time over creating a new query from scratch.

  1. In the Data Query feature, click the system query that you want to copy in the System Queries folder on the side panel.

  2. On the query screen, click Save As.

  3. The Save Query As window appears. In the Name field, enter a new name for the query.

  4. Click Save.

  5. The query is saved in your My Queries folder and appears as an editable query. You can now make changes to the new query, as needed.