Advanced queries
Advanced queries enables you to define search criteria. A query by example interface is available similar to the basic query for artifact attributes, except here all attributes common to the artifact types being searched will be available. Additionally searches for artifact's associated to particular users or opened within a given date range are available. Dates are given in YYYY-MM-DD format and in some cases can be specified as relative to when the query is run.
The most common way to access the Advanced query page:
- Select the Query artifacts tab on the Project Tracker page.
- Click the Create New button.
- Click the Advanced Query sub-tab.
To create an advanced query:
The first step in creating an advanced query is to define the
artifact types involved. If there is only one artifact type used by
the project, this step will be skipped.
-
If only one artifact type will be used in the the query, then clicking
the link on the artifact name will move on to the filter definition.
-
If multiple aritifact types will be included in the query,
you can identify artifact types for this query by checking the checkbox for all of the artifact types to be searched and click Add Selected
button.
-
A minor feature on the artifact selection page is the ability to define
a set of artifact types and save it with a name. This allows you to
quickly define a new query with those same artifact types. Normally this
would be useful when there are many types and you often make queries with
some subset of them. These lists will show up across different projects and
the lists are project specific, so they are only recommended for use, if
you have several projects which you query together as a
cross-project query. So further
description of this feature will be done
there. For now, just know
that the Save button and the Saved artifact type
lists... dropdown are related to this feature.
- Click Define query.
-
Then you will be taken to a page where you can enter one or more of the
following search criteria, as described in the following steps. Note that your project may have additional query fields.
In the Artifact Info section, you can enter both artifact IDs and date ranges.
If the Artifact Info section is left blank, all artifacts of the designated type or types are returned in the query results.
In the Artifact Changes section, you can enter a date or a date range in which the artifact was (or was not) modified.
In a single artifact type query, sections for each group of attributes, similar to how an artifact's details are displayed, are available for specifying attribute criteria.
In a query that uses multiple artifact types, attributes which are shared by all the types involved are shown in the Common Attributes section.
You can enter text strings or select artifact values from a list, for example, for a Status attribute, you might select the value of Open.
- In the Attribute Changes section, select an attribute from the Attribute drop-down list and click Update.
The page is refreshed. You must scroll back to this section to finish completing it. Select the original and new values and a time frame for the change.
In the Personnel Association Search section, you can look for people associated with the user attributes. Or you can search for artifacts which are
missing a given associations, e.g. artifacts that are unassigned.
In the Search Results View Preferences section, you can set the output type for the query results and other characteristics, such as the number of results to display per page.
To run the query immediately, click Submit.
To save the query for later use, click Save this query.
The query will appear as a link on the main query page.
Searching by personnel
The Personnel association search section allows you to search for artifacts based on users associated or for those with no user associations. You can specify the creator of the artifact or any of the other user attributes in use by the artifact types chosen for the query.
-
By username
If you know the usernames, the quickest way to enter the search criteria is to enter the username directly into the text field, select the appropriate attribute or 'Any', and click the Add user button.
-
Looking up a user
If you don't remember the username, you can click the Edit list button. Once on the Select user screen you can select from the list of project members to add to your user association list. All users that are associated with artifacts in the project can be selected in this section. You can select as many users are you require. For each user you can also limit the search by association. You can choose to associate a particular user by any user association attribute defined for your project using the Association list. Once you have selected all the personell you require click the Add Assignee and click the Done button to
return to the main definition screen.
-
Querying artifacts associated with the current user
Similar to the previous item, click Edit list button.
- You will see a page which shows a value "<current user>" under the Special Values tab, where "<current user>" is the person executing the query.
- Check the box under Select.
- You can leave the association as 'Any' or choose a specific attribute.
- Click Add Selected after you have made your choice.
- Click Done to complete the process and return to the
main query definition page.
Assuming such a query is saved as a project-scoped query or other means
are used to execute the query by different users, the query will return
results corresponding to the user running the query.
-
Unassigned artifacts
Using the Search for artifacts with no associations section you can define a search for artifacts for which no assignees with a particular user attribute have been associated. For instance, if you have a "QA Lead" user attribute defined for your project and want to know which artifacts have not been assigned a QA Lead, you can elect to search for all artifacts with no association of type "QA Lead".
You can choose as many user attributes as you need for your query.
Searching by a change of an attribute's value
This field allows you to search for artifacts with attributes that have changed from one value to another value. For example, you can search for defects with Status attributes that have changed from New to Open. You can specify a date range for the change. For example, you can find artifacts that have changed from a low severity to a high severity within the last week. By default, the attribute and values fields are empty. To create an attribute change query, select an attribute name and click the Update button. The valid values for the attribute become available for selection in the From Value and To Value fields.
Search result preferences
Currently the columns shown in the query results are set from the query
results page. But some result preferences can be set before executing the
query. These include the user identification, format such as web or CSV,
and number of results. You can submit your query or choose to save it.
|
|