TFS State Changed Date not Working
-
03-12-2019 - |
Question
We're using the Scrum 1.0 template for TFS. We're trying to do a work item query and I've noticed the State Changed Date
for all of our items is empty. If I do a search for Changed Date
, that works fine, but doesn't produce the desired results...
Why would this be the case?
Solution
- Export the WIT (Task, Bug or Impediment) using the Process Editor or witadmin to a file.
Add the following block within the element:
<FIELD refname="Microsoft.VSTS.Common.StateChangeDate" name="State Change Date" type="DateTime"> <WHENCHANGED field="System.State"> <SERVERDEFAULT from="clock" /> </WHENCHANGED> <WHENNOTCHANGED field="System.State"> <READONLY /> </WHENNOTCHANGED> <HELPTEXT>Date and time that the value of the State field changed. </HELPTEXT> </FIELD>
Save the file, and import it back to TFS using the Process Editor or witadmin..
- Click the Refresh button on Team Explorer.
From this point forward changing the state of a work item will be queryable.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow