If you look at C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\TFSJobAgent\Transforms\WorkItemChangedEvent.xsl on the TFS 2010 Application Tier, you will see three sections similar to:
<!-- If a field is changed, System.ChangedBy will also be changed. That's at least 2 fields.
If there is only one field in ChangedFields//Field, it must be System.ChangedBy, which will be ingored.
So it's safe to use "count(/WorkItemChangedEvent/ChangedFields//Field) > 1",
rather than count(/WorkItemChangedEvent/ChangedFields//Field) > 1 or (count(/WorkItemChangedEvent/ChangedFields//Field) = 1 and /WorkItemChangedEvent/ChangedFields//Field[1]/ReferenceName[.!='System.ChangedBy'])
-->
<xsl:if test="boolean(/WorkItemChangedEvent/TextFields/TextField) or count(/WorkItemChangedEvent/ChangedFields//Field) > 1">
That logic is no longer valid since ChangedDate is excluded from the list of changed fields because it’s a computed column.
Perform these steps to fix the code:
- Make a copy of the C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\TFSJobAgent\Transforms\WorkItemChangedEvent.xsl file and save it as a backup.
- Replace “ChangedFields//Field) > 1” with “ChangedFields//Field) > 0” everywhere in the new file.
- Save this modified file with its original name in the same folder.
- Run a test to see if the e-mails have the proper data.