Create a query by using the Query editor and Display editor
You can create a query in two ways. You can use the Query editor and Display
editor to specify the filter criteria and fields to display, or you can use
the Query Wizard. To create a query by using the Query editor and Display
editor:
- Click Query and clear Use Query Wizard.
- Click .
- Select Defect in the Choose Record Type window, and click OK.
- Click the Display editor tab.
- You can specify which fields from the Defect record type appear in the
query results and how they should appear. To select a field to display, double-click
it in the Fields pane or drag it from the Fields pane
to the Display Fields grid. Select the following fields
to display:
- Headline
- id
- Owner
- Project
- Severity
- State
Use the Sort Order column to specify the order in which to display the query results. Enter numbers in the Sort Order cells as follows:- Severity 1
- State 2
- Owner 3
- id 4
- Project 5
- Headline 6
- Click the Query editor tab. You can specify which fields to use as filters when establishing the selection criteria for the query.
- Specify the filters and selection criteria:
- Double-click the State field in the Fields pane. The State field appears in the Filters pane, and the Filter window opens.
- Be sure that Define Filter is selected.
- Select Equal from the Operator list.
- Click Values. In the Select Values window, select Submitted and click OK.
- Double-click the Severity field in the Fields pane.
- In the Filter window click Values. In the Select Values window select 1-Critical and 2-Major, and click OK. The query is now defined to return all records that are in the Submitted state with a severity level of critical or major.
- Run the query by clicking Run Query from the toolbar.
- Examine the records that the query returns in the Results grid.
- Click Query Name field, and click OK to save the query in the Personal Queries folder of your workspace. . Enter SubmittedCriticalMajor in the