Historical Queries (Work Item Query Reference)

You can use an asof clause in a query to find those work items that satisfied the specified condition on a specific date at a specific time.

Historical Queries

For example, suppose a work item was classified under an iteration path of MyProject\ProjArea and assigned to 'Mark Hanson' on 3/17/06. However, the work item was recently assigned to 'Roger Harui' and moved to a new iteration path of Release. The following example query will return this work item because the query is based on the state of work items as of a past date and time.

Note

If no time is specified, WIQL uses midnight. If no time zone is specified, WIQL uses the time zone of the local client computer.

Example

SELECT [System.Title] FROM workitems WHERE ([System.IterationPath] = 'MyProject\ProjArea' and [System.AssignedTo] = 'Mark Hanson') asof '3/16/06 12:30'

See Also

Other Resources

Syntax for the Work Item Query Language