user10411548
user10411548

Reputation: 13

Query TFS based on value change of a field

There is any possibility in TFS UI to query based value changed of a field? E.g.

Query all work items which have changed Automation status field to "Automated" in the past 2 days.

Upvotes: 1

Views: 1588

Answers (3)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30392

If the Automation status field reference the System.State (reference name), then you can try below query: enter image description here

If the filed doesn't reference System.State, then we cannot achieve the requirement.

However you can custom a field and apply rules for the field to copy the value of State Change Date, something like this :

<FieldDefinition name="test" refname="test.date" type="DateTime">
  <WHEN field="Automationstatus.xxx" value="Automated">
    <COPY from="field" field="Microsoft.VSTS.Common.StateChangeDate" />
  </WHEN>
  <HELPTEXT>test</HELPTEXT>
</FieldDefinition>

Thus when you change Automation status to "Automated" for a work item, the changed date will be copied to the test filed. Then you can use the test field to filter the work items in future... but it's not available for current work items.

Upvotes: 2

jessehouwing
jessehouwing

Reputation: 114751

No there is no easy way to query on the change times of specific fields in the UI from the work item queries.

If your company has the Analytics Services turned on and available to users, then you could use Excel's Power Pivot tools to query the cube directly.

NOTE: The TFS Warehouse and Analytics Cube haven't seen major updates since their introduction in 2010 and are being replaced by the new OData based Analytics Service in Azure Devops.

Upvotes: 1

Yan Sklyarenko
Yan Sklyarenko

Reputation: 32250

I doubt there's a query parameter to satisfy your criteria entirely, but the closest I can come up with is this:

enter image description here

Upvotes: 0

Related Questions