The AccuWork Queries Tab

Opening a Queries Tab

Standard Query Mode Layout

Query List Pane Layout

Query Results Pane Layout

Edit Form Pane Layout

Working in Standard Query Mode

Working in the Query List pane

Additional Operations in the Query List Pane

Working in the Query Results pane

Commands Available in the Query Results Pane

Working in the Edit Form pane

Workflow Query Mode

Executing a Workflow Query

Working with the Results of a Workflow Query

Issue Record Fields Used in a Workflow Query

Configuring the Users/Groups and Streams Panes

An AccuWork query retrieves a set of records according to user-defined selection criteria. AccuWork has a point-and-click interface for creating and editing queries; it enables you to create simple queries quickly, and to create sophisticated queries in a straightforward, reliable way.

By default, the queries that you create are private queries, which cannot be seen by other users. You can declare any query to be a public query. Such queries are visible to all users, who can use and copy them, but cannot modify your original.

Opening a Queries Tab

Choose the Issues > Queries command from the GUI main menu, or click the button in the GUI main toolbar. A Queries tab opens in either of these modes, whichever was used most recently:

 Use the buttons at the right side of the toolbar to switch between this mode

Standard Query Mode Layout

In Standard Query mode, the Queries tab includes two (and sometimes three) panes, each with its own toolbar:

Query List Pane Layout

The Query List pane contains a list of the private queries (AccuWork) A query that appears in the Queries pane only for the user who created it. See public query. you've defined for the current issue database (AccuWork) A set of issue records, each of which implements a bug report, feature description, etc. Each depot can have its own issues database. Each issues database has its own schema., along with any public queries (AccuWork) A query that appears in the Queries pane for all users. See private query. defined by you and/or other users. The listing is not alphabetical -- whenever you create a new query, it's simply added to the end of the list. (But you can rearrange the list.)

Your queries (both private and public) are always listed above other users' public queries.

See Working in the Query List pane.

 

 

 

Query Results Pane Layout

The Query Results pane contains a table that displays the results of a query. Each row of the table displays one issue record; each column displays a particular issue-record field.

Each query has its own results-table design: a set of columns (fields), in a particular order and with particular column-widths. The results table’s design can also include a single-level or multiple-level sort order for the rows (issue records (AccuWork) A data record, consisting of values of data fields, stored in an issue database.).

When you create a new query, AccuWork automatically starts off the results table with a couple of columns, including Issue (issueNum field). You can add more columns at any time. You can also remove the Issue column from the table. [note "Issue" is the default label for the issueNum field, but the edit-form designer can change the label.]

See Working in the Query Results pane.

Edit Form Pane Layout

The Edit Form pane is just like the "full size" Edit Form tab, except that it occupies a pane within the Queries tab, instead of having an entire tab to itself. This pane displays the entire contents of the issue record that's currently selected in the Query Results pane. In addition, browse arrows are enabled in the Edit Form pane's toolbar, making it easy to view some or all of the records selected by a query.  There is also a Change Package History icon ( ) that displays all the modifications that have been made to the change package for this issue.

See Working in the Edit Form pane.

Working in Standard Query Mode

Here's a typical Queries tab workflow in Standard Query mode:

  1. In the Query List pane, create a new query (or select an existing one), then execute the query.

  2. In the Query Results pane, view selected fields from the issue records selected by the query.

  3. Open the Edit Form pane to view the entire contents of one of the selected issue records (and perhaps modify it).

The following sections describe working in each of the Queries tab's panes.

Working in the Query List pane

Working in the Query Results pane

Working in the Edit Form pane

Working in the Query List Pane

You can invoke the following commands in the Query List pane, using context menus or the Query List toolbar. Most commands operate on the currently selected query.

Run query

(equivalent: double-click the query name) Executes (or re-executes) the selected query, displaying the results in the Query Results pane. You don't need to run this command when you revise a query in the Edit Query window -- AccuWork automatically executes the revised query and updates the results table.

Save all queries

Save all your private queries. (There is no way to save a single query.) Your private queries are stored in the AccuRev repository within the depot directory, in an XML-format file:

.../storage/<depot-name>/dispatch/config/user/<username>/query.xml

Notes (click to view):

New query
Edit query

Create a new query or revise an existing one, using the Edit Query window.

Clone query

Create a private query that is a copy of the selected private or public query. The new query is initially named "Copy of ...", but you can change the name.

Move query up
Move query down

Change the position of the selected query in the Query List pane. Note that your own queries (both private and public) are always listed above other users' public queries.

Delete query

Remove the currently selected query. The deletion does not take effect until you run the Save all queries command. If you close the Queries tab without saving your queries, the "deleted" query will still exist the next time you open the Queries tab. This may or may not be the right thing to do: closing the Queries tab without saving also discards changes you've made to other queries since the most recent save.

Set as Default
Disable as Default

Designates one of your private queries to be -- or to stop being -- your default query An AccuWork query that you've designated to be executed automatically in certain situations: when you open a new Queries tab; when AccuRev prompts you to specify one or more issue records in a Send to Issue command; when you execute Promote and an AccuRev/AccuWork integration is enabled. for this issue database. [note This is your default query -- another user can set one of his own private queries to be his default query.] The query name is redisplayed in bold-italic to indicate that it's the default query.

Your default query for an issue database is executed:

A query loses its status as your default query when you run Disable as Default on it, or when you select another query as the default.

Set as Private
Set as Public

Changes a query that you created from public to private, or vice-versa.

Additional Operations in the Query List Pane

Renaming a Query

You can rename any of your private queries in the Query List pane, without having to open an Edit Query window:

  1. Select the query.

  2. Press function key F2 or click the query name again. (Be careful not to double-click; that invokes the Run Query command.)

Revisiting the Results of a Query

Whenever you select a particular query in the Query List pane, the Query Results pane displays that query's most recent results. The cache of previous query results is cleared when you close the Queries tab.

Working in the Query Results Pane

In many cases, browsing the results table produced by running a query may be all you need to do. But in other cases, you may want to see a selected issue record in the context of its edit form. Why?

You can use a "full-size" or "reduced-size" edit form to view a issue record:

With either tool, browse arrows in the edit form's toolbar make it easy to view some or all of the records in the results table.

Commands Available in the Query Results Pane

The following commands are available in the Query Results pane:

 

 

 

Open Issue

Open a separate Edit Form tab to view/revise the currently selected issue record.

Setup Columns

Open a Columns window, in which you can change which columns (fields) appear in the table, and also change their order.

Remove Column

(appears only in the context menu of an individual column) Removes the column you right-clicked from the results table. (This is a shortcut, eliminating the need to invoke the Setup Columns command.)

Export Table

Open a File Chooser window, in which you specify a file to store the entire contents of the results table. [example]

 

Show Issue Form

Toggles whether an Edit Form pane appears, displaying the complete contents of the currently selected record in the Query Results pane.

See also:

AccuRev's standard table-manipulation operations

Working in the Edit Form Pane

Using a "reduced-size" edit form within a pane of the Queries tab is virtually the same as using a "full-size" edit form in its own tab. Here are some notes on the few differences:

Workflow Query Mode

If you are using AccuWorkflow, Workflow Query mode provides a very easy way to analyze issue records by the workflow stage A node in an AccuWork workflow, representing one of the steps in the 'lifetime' of an issue record. See workflow, workflow transition. they belong to. In this mode, the Queries tab is divided into four panes:

The selections you make in the users/groups pane, the streams pane, and/or the workflow pane build a query. In the illustration above, one item is selected (highlighted in blue) in each of these panes, defining a query that returns all issue records for which:

(The query might involve some User-type field other than Assignee, and some Stream-type field other than Target Release. See Issue Record Fields Used in a Workflow Query.)

In the users/groups pane and the streams pane, you can select multiple items, by holding down the Ctrl key while making the additional selections. This defines an OR compound clause, such as:

You can also leave one or two of these panes with no item selected. (To deselect an item, click it while holding down the Ctrl key.) This removes that "dimension" from the query. For example, if you don't specify a stream, then the query will choose issue records regardless of their Target Release.

Notes (click to view):

Executing a Workflow Query

To execute the query according to your current selections, click the toolbar button. Selected fields The fields and field-widths are specified in the Change Package Results section of the Change Packages subtab of the AccuWork Schema Editor. See the AccuRev Administrator's Guide from the issue records selected by the query appear as a table in the query results pane.

Working with the Results of a Workflow Query

You can work with the issue records selected by a workflow query in some of the same ways as with a Standard Mode query. In particular, you can invoke Open Issue on a single issue record or Export Table on a selected set of issue records.

In addition, drag-and-drop operations provide a "batch update" capability for the configured User-type field and the Stream-type field:

The User-type or Stream-type field that you change with a drag-and-drop operation does not need to be among the fields displayed in the query results pane.

Issue Record Fields Used in a Workflow Query

In the example above, the selected user/group was used as the value of the Assignee field, and the selected stream was used as the value of the Target Release field. The issue record fields to be used in the query are configurable, using the Setup Workflow Query Fields toolbar button on the Workflow subtab of the AccuWork Schema editor.

The issue record field(s) used by the workflow stage selection (in this example, In Dvt) depend on the definition of that workflow stage, on the Validation subtab of the AccuWork Schema editor. For example, the In Dvt stage might be defined in terms of a single issue record field:

wflowStage is In Dvt

Or it might be defined in terms of multiple issue record fields:

AND
state is WIP
status is Scheduled

See chapter "Designing Issue Databases and Edit Forms: The Schema Editor" in the AccuRev Administrator's Guide for details.

Configuring the Users/Groups and Streams Panes

You can choose which user and group names appear in the users/groups pane, and which stream names appear in the streams pane: