Hidden Gems in TFS–Part 5 Handling alerts and notifications

In this series of blog posts I like to highlight some features of TFS/Visual Studio that people seem to overlook. In my day to day job I often see that people don’t know about certain feature that are available in Team Foundation Server, Visual Studio or some of the Powertools.

Some features are available as a Powertool. These can be downloaded from here

Earlier Posts

In this part…….

Handling alerts and notifications

I often get questions about alerts. For example.

  • I want to have an email when someone assigns a bug to me
  • I want to have an email when person xxx checks in code
  • I want to call a service when the build completes
  • I want a notification when the state of this work item changes.
  • etc.

Team Foundation Server makes intensive use of events. Many actions trigger an event on the Team Foundation Server and the good thing about this is that you can subscribe to these events.

Examples of events are:

  • Work Item Changed
  • CheckIn event
  • Build Completed event

When subscribed to an event you can do two things. You either send an email or you call a SOAP webservice. Especially calling a Webservice gives you a ton of possibilities to extend Team Foundation Server to your own needs. You can find all about this in this article (VS 2008 but still applies).

You can subscribe to events in different manners. You can use the commandline tool BISSUBSCRIBE.

You can also use the default project alert dialog. This defines some default scenarios on which you can subscribe to receive an email.

image

image

However, the most powerful way to subscribe and have optimal control is to use the Alerts Explorer that is part of the powertools.

On Collection level click right and choose Alerts Explorer.
image

In the alerts explorer, you can easily set up alerts based on a query.

Click New Alert choose your category and choose OK
image

After that you can further modify you filters and delivery methods.

image

Html and Plaintext send an email message in the selected format. SOAP calls a webservice. This webservice has to implement a specific interface. This is described here

Have fun !

Advertisements

Comments are closed.

%d bloggers like this: