Επεξεργασία

Κοινή χρήση μέσω


Query work item history and discussion fields in Azure Boards

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

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.

Note

There is no Discussion work item field. To query work items with comments entered in the Discussion area, you filter on the History field. The full content of the text entered into the Discussion text box is added to the History field.

Supported operators and macros

Query clauses that specify the History field can use the Contains Words and Does Not Contain Words operators. Search against an exact phrase or to use the wildcard character, *. You can only use the wildcard character at the end of a partial word or phrase.

The History field is automatically indexed for full-text search when full-text search is available. See Full-Text and partial word searches

Query a work item's history

You can use either the web portal or Team Explorer to view the history of a work item or find work items based on the contents of the History field. When you run a search on the contents of the History field, it returns only work items that have changes recorded in that field. That is, it doesn't register changes that were made to text in other fields.

Screenshot of Query Editor to Search for items based on words contained in the History field.

List items based on the contents of the History field

You use the query editor to add the History field to a query clause. Comments entered into the Discussion area are queryable. Change history entries, such as which fields were changed, aren't queryable. To quickly find items based on words entered into the Discussion area, or Description or other rich-text fields, consider using work item search.

You can filter for work items by the date on which they were changed or for a specific time period. If you limit the scope of your query, it can help with performance by only returning those results that fit the date range that you want to include.

Filter for

Include these query clauses


Items whose History field contains the word "reproducible"

History Contains Words reproducible

Items whose History field doesn't contain the word "beta"

History Does Not Contain Words beta

Items that contain the phrase "stack traces" and were closed but reactivated

History Contains Words stack traces And State Was Ever Closed
And State <> Closed

Items closed within a specified time period

State = Done
And Closed Date > 7/1/2015
And Closed Date <= 7/21/2015

Items I've been associated with

History Contains Words MyName
Or Assigned To Was Ever _ @Me


Tips for using the query editor

  • Enter the complete word or phrase that is specified in the History field of those work items that you want to find.
  • 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 won't 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 won't be found. However, if you search for the complete word reproducible, the work item can be found. You can also search for the string with a wild card, such as repro*.
  • The query editor ignores common words or stop words as defined in Configure and Manage Stopwords and Stoplists for Full-Text Search.
  • On the query editor toolbar, choose Run query or Run query, earlier version icon and confirm that your query returns expected results.
  • If you don't receive the results you expect, adjust the word or phrase that you entered, and run the query again.

View the history of work items

An entry is made to the History field each time a work item is saved. To view the history of changes, open an existing work item, and then choose the history tab icon or History tab, or for some work item types, choose the Details tab.

The history details shown depend on the platform, version, and client.

Screenshot of Work item form, Web portal, Choose History tab.

The state change history diagram appears first. To see the entire history of state changes, choose Show all.

Screenshot of Work item form, Web portal, State change history diagram (web portal only).

Choose an entry in the left pane to view the details of changes made.

Screenshot of Work item form, History tab, Web portal, Details.

Filter the history view

The History tab is designed to track all changes made to a work item to support full traceability. The long revision history that results can make it difficult to understand when changes happen to specific fields. To quickly find revisions made to a specific field or by specific people, filter the history view.

Note

The Toggle filter feature requires you to enable the New Boards Hub preview feature. To enable this feature, see Manage or enable features.

You enable the filter feature by choosing Toggle filter.

Screenshot of Work item form, History tab, Web portal, history filter enabled.

To review updates by specific people, select their names from the Updated by menu.

Screenshot of Work item form, History tab, Filter by who made updates.

To review updates made to one or more fields, select the fields from the Fields menu.

Screenshot of Work item form, History tab, Filter on changes made to Assigned To field.

Fields that support history, auditing, and revision tracking

You can use the following fields to filter queries and create reports. Several of these fields are populated with information as a work item progresses from one state to another. Other fields update when the work item is modified. Some fields don't appear on the work item form, but they're tracked for the WITs listed.

Field name

Description

Work item type


Changed By

The name of the team member who modified the work item most recently.

Reference name=System.ChangedBy, Data type=String

All

Change Date

The date and time when a work item was modified.

Reference name=System.ChangedDate, Data type=DateTime

All

Closed Date 1

The date and time when a work item was closed.
Reference name=Microsoft.VSTS.Common.ClosedDate, Data type=DateTime

All

Created Date

The date and time when a work item was created.

Reference name=System.CreatedDate, Data type=DateTime

All

History

The record of changes that were made to the work item after it was created. Every time that the work item is updated, information is appended to the history, which specifies the date of the change, who made the changes, and which fields were changed.

Note

History field queries return work items whose Discussion comments or Description fields contain words that match the keywords entered. You can't use the History field to query on changes made to other fields.

You can't add formatted text to the history field. Once you've saved the work item, you can't alter the history.
The History field, along with the Description, Steps to Repro and Title fields are automatically indexed for full-text search as described in Query fields, operators, and macros.

Reference name=System.History, Data type=History

All

Resolved Date 1

The date and time when the work item was moved into a Resolved state.

Reference name=Microsoft.VSTS.Common.ResolvedDate, Data type=DateTime

Bug (Agile, CMMI)

Rev

A number that is assigned to the historical revision of a work item.

Note

A work item revision limit of 10,000 is in effect for updates made through the REST API for Azure DevOps Services. This limit restricts updates from the REST API, however, updates from the web portal are not affected.

Reference name=System.Rev, Data type=Integer

All

Revised Date

The date and time when a work item was revised or modified.

Reference name=System.RevisedDate, Data type=DateTime

Shared Parameter, Shared Step, Test Case

State Change Date

The date and time when the value of the State field changed.

Reference name=Microsoft.VSTS.Common.StateChangeDate, Data type=DateTime

All

Tracks other operations performed when modifying a test suite, for example: adding tests to a test suite or changing configurations. This field can be viewed through the History tab or through a separate query. There's a consolidated history view, including changes performed to work items field and changes resulting from related artifacts such as test points and configurations.
Reference name=Microsoft.VSTS.TCM.TestSuiteAudit, Data type=PlainText

Test Suite

A system-managed field (not editable) that increments with changes made to a work item.
Reference name=System.Watermark, Data type=Integer

All

Note

  1. For these fields to be defined for a WIT, they must be included in the WORKFLOW section of the WIT definition. For example, this syntax is included within the FIELDS definition when transitioning to a Resolved state:

    <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">  
       <SERVERDEFAULT from="clock" />  
    </FIELD>  
    

REST API

To programmatically interact with queries, see one of these REST API resources: