Advanced queries

Advanced queries enables you to define search criteria for an artifact. You can use this form to enter values for some, all or none of the attributes available in an artifact type. For example, to view Defects that are related to Linux and have been closed in the last week, you would enter a date range (using MM/DD/YYYY format, for instance, 01/01/2002) and enter values for the operating system and status attributes.

To access the Advanced query page:

  1. Select the Query artifacts tab on the Project Tracker page.
  2. Click the Create New button.
  3. Click the Advanced Query sub-tab.

On the Advanced query page, you identify the artifact type or types that you want to use in the search. You can optionally specify additional search criteria, such as a date range, particular users associated with an artifact, and so on. Query criteria include:

If you run a query without defining any attributes, all artifacts associated with the logged in user ID will be returned.

Overview of advanced searches

The Artifact ID if known, provides a simple way to find one or more artifacts. To search by more complex criteria, you must create a custom query. All advanced queries allow you to search by people associated with the query. For example, you can search for "all artifacts assigned to me" or "all artifacts created by John Smith."

You can search using a date and time relative to when an artifact was created, or a combination of the last time it was modified and when it was created. All relative times, such as "in the last week" are calculated based on the time when the query is run. Note that if you search by modification (change) date, Project Tracker also returns artifacts that have been created but have not been changed since their creation date. This is because Project Tracker treats the creation date as a modification date.

Text strings that you enter in attribute fields are searched in a case-insensitive manner.

Query definition pages may contain additional (non-default) input fields that are based upon any attribute groups that have been defined for the artifact type.

To create an advanced query:

  1. Click Project Tracker > Query artifacts in the left navigation pane.
  2. Click the Create new button.
  3. Click the Advanced query sub-tab.
  4. If there are multiple artifact types defined in this project, 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.
    If there is only one artifact type in this project, you can skip to step 6.
  5. To save this list of artifact types for future use, click the Save This Query button in the Artifact Types Selected section.
    Assign a name to this query, provide a description, and select whether this is a personal or a project-level query. Note that project-level queries are available to other members of the project.
  6. Click Define query.
    From this page, 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.
  7. 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.
  8. In the Artifact Changes section, you can enter a date or a date range in which the artifact was (or was not) modified.
  9. In a query that uses multiple artifact types, 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.
  10. In the Attribute Changes section, select an attribute type 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.
  11. In the Personnel Association Search section, you can look for people associated with the attribute.
  12. 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.
  13. To run the query immediately, click Submit.
  14. 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. Depending on what user attributes have been defined, you can search by the commitor and/or the assignee. You can add users to the list of selectable users by clicking 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.

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 issues 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 Options button. The valid values for the attribute become available for selection in the From Value and To Value fields. You can also set results view preferences. When the view preference is based on Artifact state or status, the sort order is not necessarily alphabetical. It mirrors the order for the attribute which is determined by an administrator. You can alter the search order and the number of artifacts that appear per page. You can submit your query or choose to save it.

Configuring the query results page

You can configure the columns that are displayed on the results page of an ad-hoc query. These settings are retained for the rest of your work session.

To configure the query results page:

  1. Click the Projects tab.
  2. Click the link for a project that uses Project Tracker.
  3. Click Project Tracker > Query artifacts in the left navigation pane.
  4. Click Create new.
  5. Click the Advanced query sub-tab.
  6. Enter criteria for your query and click Submit.
  7. On the query results page, click the Add/Remove columns link.
  8. Change the configuration of columns that are displayed on the query results page and click Done.