Filter Work Items in Documents

You can filter a Document to show only a subset of all the Work Items it contains. For example, a specification might contain requirements for different operating systems. Assuming a custom field named OS to designate the operating system, you could filter the Document to show only requirements for Ubuntu Linux, for example, by querying on the custom field.

Filtering is accomplished using the integrated Apache Lucene query engine and query language. The Visual Query Builder tool is available to help you construct simple or complex queries graphically, if you are not familiar with the query language syntax.

  1. On the Document toolbar, click ActionsFilter. The Document becomes read-only, and filter controls appear in the Document Editor toolbar.

  2. In the Filter Work Items field, enter the visual query elements, query language syntax, or a combination of the two as needed to obtain the results you want: OS:Ubuntu, or severity:must_have, for example.

Tip:

You can also filter Work Items when viewing any revision of a Document in the Document history.

If an item shown by the filter is the child of one or more other items, the parent items are also shown in the Document regardless of whether or not they match the filter criteria.

While viewing the Document in its filtered state, you cannot edit the text. However, you can:

  • Access the Document history and compare revisions.

  • View and edit Work Item properties and links in the Document sidebar.

  • Export the filtered Document using Word Round-trip Export Document. Only the Work Items shown by the filtering are included in the exported document.

  • Print the Document or export it to PDF. Only the Work Items shown by the filtering appear in the printed copy or exported PDF file.

  • Reply to any comment that is shown when the filtering is engaged (but not create new comments).

  • Access linked Work Items that are hidden by the filter. Linked items appear in the Properties of Work Items shown by the filter and if clicked, open in a new browser tab.

  • Return to the unfiltered view of the Document by clicking Close Filter.

See also Search Work Items.