A common issue when working with Team Foundation Server and work items is how changes in a work item can be notified to a user using standard email.
By using the BisSubscribe.exe tool (discussed in the previous post) we can use a command-line utility that adds subscribers to the TFS notification database. The tool can be used for setting up email notifications as well as notifications to a generic web service for application level integration. In this scenario we’ll use the email option.
So to register for a notification when a work item’s status changes we’ll use this command:
BisSubscribe.exe /eventType WorkItemChangedEvent /deliveryType EmailHtml /server http://localhost:8080 /address mathias@win2003 /filter """"PortfolioProject""" = 'Effective VSTS' AND ("""ChangedFields/StringFields/Field[ReferenceName='System.State']/OldValue""" <> """ChangedFields/StringFields/Field[ReferenceName='System.State']/NewValue""")"
Whenever someone changes the status of a work item TFS will produce a mail similar to the following: