Query Browser

You use the Query Browser to create and manage queries and query results:

The Query Browser tab has two panes, each with its own toolbar—the Query List pane and Query Results pane.

Query List Pane

The Query List Pane displays all of your private and public queries, as well as any public queries created by other users in the depot. (A public query is a private query that the query author has made available to all users in the depot. All queries you create are private unless you explicitly make them public.

Your queries (both private and public) appear in a folder with your username; different icons are used to distinguish your private and public queries. Public queries created by other AccuRev users appear in a folder named Public. By default, queries are listed in the order in which they are created, but you can move them using the Move query up () and Move query down () buttons.

Commands

You can invoke the following commands from the Query List pane. Commands are available in both the toolbar and context menu unless noted otherwise. Note that Commands, except where noted, are available only for queries, both public and private, that you own. For example, you cannot rename a public query owned by another AccuRev user.

Run

Runs any private or public query; results are displayed in the Results pane. The columns that appear are those that were included in the query when it was defined or last modified. You can change columns for private queries, and for any public queries you own. See Set up Columns for more information.

Tip: You can also run a query by double-clicking it.

Save

Saves changes to all queries that you own. This command is available only from the Query List pane toolbar.

New Query

Allows you to create a new query. By default, the query is named New Query N, where N is a unique number. Use the Rename Query command to rename the new query. This command is available only from the Query List toolbar. See Create a Query for more information.

Edit Query

Allows you to edit any of your public or private queries. See Edit a Query for more information.

Rename Query

Allows you to rename any of your public or private queries. See Rename a Query for more information.

Clone Query

Creates a duplicate of the selected query. If you clone a public query, the new query is created as a private query by default.

By default, the cloned query is named Copy of Query, where Query is the name of the query you cloned. Use the Rename Query command to rename the new query. See Rename a Query for more information.

Set up Columns

Allows you to specify which columns (AccuWork fields) are displayed in the Results pane for the selected query. You can optionally save selected columns as a default set to be used to display results for any new queries you create. This command is disabled for public queries created by other AccuRev users. See Set up Columns for more information.

Move Query Up

Moves the query up within the list of queries.

Move Query Down

Moves the query down within the list of queries.

Delete Query

Deletes the query.

Tip: The Delete key on your keyboard also performs the delete action.

Set as Default / Disable as Default

Allows you to specify a query as the default query. AccuRev runs the default query automatically when you open the Query Browser. This command is available in the context menu only.

Tip: The name of the default query is displayed in bold italics.

Set as Public / Set as Private

Allows you to make a private query public, and vice versa. This command is available in the context menu only.

Note that you cannot change a public query owned by another AccuRev user to private. If you want to modify a public query, you must first clone it. See Clone Query for more information.

Properties

(Public queries only) Displays mailto and hypertext links for the selected query. The link reflects the current state of the query; if the issues are grouped, or a chart is displayed (see Group Issues by Field), the URL will contain parameters to access that view.

The mailto link () opens a new e-mail message using your system's default e-mail application. The body of the e-mail contains the query URL (see URLs for AccuWork Queries and Issues ). Recipients can click the link and, after logging into AccuRev, view that query.

The hypertext link contains the same information as the mailto link, in a form useful for book marking or distributing. Navigating to a bookmark saved from AccuRev requires you to log in to AccuRev if you are not already.

Query Diff

Diffs the results of two queries; results of the diff operation are displayed in the Query Diff tab. The names of the queries you are diffing are displayed at the top of the tab. Arrows in the Diff column indicate whether an issue was returned by the first query (), the second query (), or both (), as shown in the following illustration:

See Diff vs Query to learn about comparing the results of a query against the results of an Issue Diff operation.

To diff two query results:

  1. Run the first of the two queries you want to diff.
  2. Click the Query Diff button ().

    Alternative: Right-click the query and choose Query Diff from the context menu.

    The Query Selection dialog box appears.

  1. Select the second of the two queries you want to diff.
  2. Click Ok.

    Results are displayed in the Query Diff tab.

Back to top

Query Results Pane

The Query Results pane contains a table that displays the results of a query. Each row of the table displays one issue.

Reducing the Number of Issues Displayed on the Page

Queries sometimes return many results, which can make reviewing issues difficult. You can click the Table Filter button () to specify how many issues you want AccuRev to display on the page.

After you set the number of items per page, the issues are shown in pages rather than one long list. The default number of items is 500. When there are more items than the limit, page navigation links appear above the table header as shown here.

Sorting

Another way to simplify the display of the Query Result pane is to sort issues based on a particular column. For example, you might want to sort issues numerically, in either ascending or descending order. To sort issues, just click on the column heading.

Grouping

Grouping allows AccuRev to group all issues based on a particular column. For example, imagine your query returns 750 issues, all of which have been assigned to different individuals on your team. If you want to quickly see which individuals have been assigned issues, you can select Assigned To from the Group By drop-down list. AccuRev collapses the display to show only unique values in the Assigned To column.

See Group Issues by Field for more information.

Filtering Query Results by Workflow

If your administrator has enabled a workflow for your depot, you can use that workflow to filter query results. See Filtering Query Results Using a Workflow for more information.

Removing Columns

If you want, you can simplify the displayed results by removing one or more columns: right-click the column heading you want to remove, and choose Remove Column from the context menu.

Note that you can remove columns only for your private queries, and any queries you have made public. You cannot remove columns from public queries unless you are the owner. See Set up Columns to learn more about working with columns for query results.

Commands

You can invoke the following commands from the Query Results pane. Commands are available in both the toolbar and context menu unless noted otherwise.

Open Issue

Opens the selected issue in an Issue Edit Form. If a third-party issue tracking tool has been configured to display AccuRev issues, the issue is opened in that tool instead. See Open Issue for more information.

Show Change Package

Opens a Changes Subtab, which shows the entries in the change package for the selected issue. Each of the entries in a change package indicates one or more changes made to a version-controlled element to implement a feature or fix a bug. This command is available in the context menu only.

Export

See Common Table Commands.

Print

Allows you to print issue table or issue details reports. See Reports About Issues for more information.

Bulk Update

Changes field values for the selected issues. See Bulk Update for more information.

Sum Columns

Returns the number of issues selected, as well as the sums of all Text fields with numeric-only data and the sums of all Timespan fields. See Sum Columns for more information.

Show Percentages

Displays percentage information for columns that contain numeric data. See Show Percentages for more information.

Code Review

If enabled by your AccuRev administrator, allows you to create a code review for the selected file, or add files to an existing code review. See Creating a Crucible Review for AccuRev Elements for more information.

Calculate Columns

Allows you to perform basic mathematical operations (add and subtract, for example) on any two columns with numeric values. A new column is created to display the results. See Calculate Columns for more information.

Back to top

Open the Query Browser

To open the Query Browser:

  1. Click the Issue Queries button () on the Web UI toolbar.

    The Choose Depot dialog box appears:

  2. Select the depot you want to query and click Ok.

    The Query Browser appears.

Back to top