When you join or visit a project, the Project Owner may have already added some saved queries which you may find useful. Once you have a well defined set of search parameters, you may want to save them for your own future use as well. Saved queries are accessible through the Query artifacts screen or Saved queries dropdown box on the query toolbar.
Saving queries
To create a saved query, first define your search parameters (for more information see Advanced queries) and click the Save this query button.
When naming your saved queries, make the query name short and descriptive. The saved query name appears in the Saved queries dropdown box on the query bar. You can add a description to further identify your query. The query description appears in the saved query list screen and can help users make a better determination of which query to use.
For example, you have defined several queries that search for artifacts that relate to the AIX operating system.
- One of your queries specifically looks for all new high priority artifacts entered. You call this AIXopen.
- A second query may search for all closed high priority artifacts. You call this AIXclosed.
You can use the description field to remind yourself that these artifacts are specifically for high priority artifacts.
Availability
Before you save your query you need to determine the availability:
- Your query can be available only to yourself by selecting Personal from the dropdown list.
- Generally This project availability is only used by Project Owners to create queries of general interest to most users involved in the project.
- If you think your query would be of value to all members of the project, you can select This project. If you do not have permission to create a project saved query, the query is submitted to the administrator for approval.
Click the Save button to complete the saving process.
NOTE: Once a query has been saved, it is not automatically updated if there is a change to the availability of the search criteria in the project. For instance, if you save a query with specific options selected and those options are removed from the artifact type, the query returns all artifacts that meet the search criteria minus the removed options. However, if on some rare occasion one or more of the options is later re-added to the artifact type, the query returns no results until a new artifact containing the search criteria is created.
Managing saved queries
Saved queries are managed from the same Saved queries table that is used to execute the queries. All available saved queries appear in this table. Click on the Edit link to access the query edit screen. Clicking the query name executes the query.
Queries can be deleted or copied from the same table. Just use the checkboxes to select the queries you would like to affect and click the appropriate button.
- The Copy selected button creates a copy of the query. You can edit the copy using the Edit link. Using this feature can help you to create fine-grained saved queries.
- The Delete selected button removes the saved query from your list. You can delete any of your personal saved queries; only Project Owners modify project-saved queries.