While trying to take advantage of the new trend charts in TFS 2013.4, I realized that the state change date was not added to the item template in the TFS Scrum template. I had to resort to using the modification date, but this skews the results for items that haven’t actually changed in a long time but have had a property change (notably the priority when reordering the backlog).
I found this article which explained the changes to be made, but my version of TFS is in French, so here is the French version to add to tasks, bugs, and backlog items in the <FIELDS></FIELDS> section:
<FIELD name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime">
<WHENNOTCHANGED field="System.State">
<READONLY />
</WHENNOTCHANGED>
<WHENCHANGED field="System.State">
<SERVERDEFAULT from="clock" />
</WHENCHANGED>
</FIELD>
Here is the query created to fetch items whose state has changed in the last 4 weeks:
Here is the corresponding chart (note that there are not many items since the state change date has just been incorporated):
And its configuration:
Hope this helps!