Query for work items using the History field
Go here to open the Visual Studio 2015 version of this topic.
The history of a work item tells you who opened the item, what changed, and why. This information helps you track how an item changes over time. When you enter information in the history field, provide as much information as possible to help the next work item owner understand what has happened and what they have to do.
You can use either Team Explorer or Team Web Access to view the history of a work item or find work items based on the contents of the History field. When you perform a search on the contents of the History field, it returns only work items that have changes recorded in that field. That is, it does not register changes that were made to text in other fields.
Requirements
- To perform these procedures, you must be a member of the Readers group or your View work items in this node permission must be set to Allow. For more information, see Add team members.
To view the history of work items
Open an existing work item, and then choose the History tab, or for some work item types, choose the Details tab.
If you open the work item from Team Web Access, you'll see the state change history diagram. To see the entire history of state changes, choose Show all.
State change history (TWA only)
To view only the comments that were added to the log, choose the Discussion Only tab.
To view all changes made to the item, choose the All Changes tab, and then choose the show all changes link for a specific date and time.
Choose hide all changes to collapse the entry.
Note
From Team Web Access, choose the expand icon for a specific date and time, as the next illustration shows.
To find work items based on the contents of the History field
Open a query, and add a query clause.
For the Field, choose History and for the Operator field, choose Contains Words or Does Not Contain Words.
For Value, type the complete word or phrase that is specified in the History fields of those work items that you want to find.
Note
Enter the full text for the word that you want to search. The History field is indexed for full-text search. If you enter only a partial word, the query will not return work items that contain the full word. For example, if the History field contains the phrase reproducible behavior and you search for repro, the work item will not be found. However, if you search for the complete word reproducible, the work item will be found. You can also search for the string with a wild card, such as repro*.
Also, common words are ignored. The search engine ignores words that are defined as stopwords. For more information, see the following page on the Microsoft Web site: Stopwords and Stoplists.
On the query editor toolbar, choose Run or (Run query), and confirm that your query returned the results that you expected.
If you do not receive the results that you wanted, adjust the word or phrase that you entered, and run the query again.