Organizing queries by using tags in the web client

You can add tags to your personal or shared queries to help organize and retrieve your queries.

About this task

When you create a query or when you edit an existing query, you can add tags to your personal or shared queries to help organize and retrieve your queries.

Procedure

  1. On the main menu, click Work Items, and then click Create Query.
  2. If you plan to save the query, in the query editor, type a name for the query.
  3. On the Conditions tab, click the plus sign icon, and then select an attribute to use as a query condition.
  4. Click Add condition, and then specify the value or condition that must be met for the attribute.
  5. Click the Details tab. Enter a description of the query so that other users can understand which work items the query returns. To add tags to your query, select
    • Personal tags: Personal tags are used to organize queries in My queries; only the owner of the query can view and edit these tags.
    • Shared tags: Shared tags are used to organize queries in Shared queries. The Shared input section is only enabled if the query is shared.
      Important: The ability to add, edit, or remove tags on a shared query is controlled by the Permissions page in the project area configuration page.
      1. Select Application Administration > Manage this Project Area.
      2. Select Permissions, and select the role of the person whose permissions you want to change.
      3. In the right pane, select Work Items > Save Query > Modify a query > Modify shared tags for a query
      4. Click Save.
    Note that the tag that you created appears in the left panel with a green tag icon QueryTagIcon for personal tags beside it. If you share your tag, it appears with a blue tag icon Shared query tag icon
  6. Tags can be hierarchical; you can create a parent tag and add child and grandchild tags.
    1. Open a query and click Details.
    2. In the Tags section, place cursor in Personal text box, and type a name of your parent tag.
    3. Beside the parent tag, type the name of the parent tag, and the name of a child tag:
      Child tag
    4. Using the context menu beside the tag icon QueryTagIcon in the left pane, you can:
      • Delete: Clicking Delete deletes the tag and all its child tags. It also updates all the queries that use these tags.
      • Rename: Clicking Rename allows you to rename the tag.
      tag context menu
  7. Click Work Items > My Queries to see your personal queries. In the My Queries tab, the queries appear on the right pane, and the shared query icon Shared query icon appears indicating if the query has been shared. You can view the queries by:
    • All queries: this lists all queries irrespective of whether they have tags.
    • Untagged: this lists queries that are untagged.
  8. The right pane of the queries page lists the queries. At the top of the right pane you can select from a predefined filter to view:
    • Shared and unshared queries
    • Only shared queries
    • Only unshared queries
    Context menu right pane
    In the Search text box beside the filter, you can further narrow down the search of your queries. For example, you could type Unresolved in the text box, and it will return any queries where the query name or description contains Unresolved. If you select a query or a few queries using the check box beside the query name, and then you clear the filter, the selections will remain checked.

    From the context menu beside the query, you can:

    Query context menu
    You can:
    • Add Tags: You can add tags to the selected query.
    • Remove Tag: If enabled, you can remove the current tag from the selected query.
    • Open in a new tab: You can open the query in a new tab.
    • Edit: You can make changes to the selected query.
    • Delete: You can delete the selected query.
  9. When you click a tag in a query on the right pane, that tag is also selected in the left pane:
    Query right tag left
    When you have selected a personal tag in the left pane, and then click Create Query, the new query will contain the tags selected in the left pane:
    New query with selected tags
  10. You can organize My Queries by dragging selected queries from the right pane to the left pane. To drag a query to the left pane, click the drag handle of the query in the right pane and drag it under a tag in the left pane.
    Note: The operation of organizing queries by dragging them under a specific tag is additive. It doesn't remove or replace existing tags.
  11. When you click Shared Queries, your shared queries appear. The list that appears includes queries that have been shared with you or with teams that you belong to. You can share queries with a whole team or specific users. The queries are grouped by team area or by predefined groups such as "Lifecycle Queries." You can use the drop down to Show Groups (exclude empty) or Hide Groups. An icon beside a query indicates if the logged-in user is the creator of the query:
    Owner of query icon
    At the top of the right pane you can select from a predefined filter to view queries that are:
    • Any creator
    • Created by me
    • Created by others
    Note:
    • For Shared Queries, if you select the Show groups option and apply a filter, the group count does not show filter result information until the queries within the group are loaded. The queries within an individual group are loaded by expanding the group. The queries within all groups are loaded by selecting Show groups (exclude empty).
    • The twistie for a group is not shown if the group is loaded and there are no queries to display within the group.