Team Foundation Server Event Subscription Tool

The Team Alerts dialog lets you subscribe to basic email alerts on a Team Project.

But the dialog is severely limited; the full richness of the email subscription mechanism in Team Foundation Server isn't available. To set up advanced subscriptions, you needed to use bissubscribe.exe. This is problematic, because the command-line syntax is complicated, and also because bissubscribe.exe is only available on the Team Foundation Server.

To address this deficiency Naren posted a GUI tool that lets you create Work Item Event Subscriptions in July 2006. I took that tool and modified it so that it supports all event subscriptions, along with a bunch of other enhancements The new Team Foundation Server Event Subscription Tool is up on CodePlex now.

Some examples of subscriptions you might want to create are:

Email me when any new work item is created:

PortfolioProject = 'TeamProject1' AND ChangeType = 'New'

Email me when any work item moves to the resolved state:

"CoreFields/StringFields/Field[ReferenceName='System.State']/NewValue\" = 'Resolved'

Email we when a specific (string) field changes in a work item:

PortfolioProject = 'TeamProject1' AND "ChangedFields/StringFields/Field[ReferenceName='field']/NewValue" <> null

Email me when someone checks source code into a specific folder:

'Artifacts/Artifact[starts-with(@ServerItem, \"$/TeamProject1/A\")]' <> null

Email me when someone overrides a checkin policy:

TeamProject = 'TeamProject1' AND PolicyOverrideComment <> ''

The queries are all based on XPath applied to the Event XML. As you can see, it's quite powerful-- far more powerful than the simplistic Team Alerts dialog would lead you to believe!

posted on Thursday, February 08, 2007 1:01 PM by jatwood

Comments

# VSTS Links - 02/13/2007

Rob Caron on Team Foundation Server and Microsoft Project.

Brian Harry on Problems installing TFS...
Tuesday, February 13, 2007 6:13 AM by Team System News

# re: Team Foundation Server Event Subscription Tool

Looks like a brilliant tool!

Just a few questions..

-Can any developer install this and run it?
-Or does it only run on the Teamfoundation Server?
Wednesday, February 14, 2007 2:09 AM by Thomas Edstrom

# Jeff Atwood's Team Foundation Server Event Subscription Tool

Jeff has posted a nice GUI for creating event subscriptions. This tool makes the process less arcane
Monday, February 26, 2007 6:49 PM by Buck Hodges

# TFS Event Subscription Tool

On CodePlex a project by Jeff Atwood was started for making it much easier to work with TFS Event Subscriptions
Tuesday, February 27, 2007 12:46 AM by if ( ! blogClogged )

# re: Team Foundation Server Event Subscription Tool

How do you know the @ServerItem element? Is there a schema or iterator definition I should be referencing?
Thursday, March 01, 2007 12:39 PM by Mark

# re: Team Foundation Server Event Subscription Tool

Thanks for the examples. There seems to be an error with this one:
'Artifacts/Artifact[starts-with(@ServerItem, \"$/TeamProject1/A\")]' <> null

I had a similar sub set up and got a message from my admin today saying that there were many errors in the log that looked like this:

Detailed Message: TF50285: Exception matching subscription: Microsoft.TeamFoundation.Server.SubscriptionOnServer:
System.Xml.XPath.XPathException:
'/CheckinEvent/Artifacts/Artifact[starts-with(@ServerIte
m, \"$/Sales -Symphony/Symphony/Code/HostedApplications/Order\")]' has an invalid token.

Once I removed the escape character '\' around the project name it worked like a champ and the errors in the log went away.
Friday, March 02, 2007 8:35 AM by Rich Denis

# TFS Event Subscription Tool

On CodePlex a project by Jeff Atwood was started for making it much easier to work with TFS Event Subscriptions
Saturday, March 03, 2007 7:06 PM by if ( ! blogClogged )

# re: Team Foundation Server Event Subscription Tool

Hi, I have a question about the TFS notification service. Is it possible to subscribe a third user? I saw the tool uses the SubscribeEvent method to create a new subscription. This method takes the user as a parameter. What happend if I put a user id other than the current user? I tried it but could no subscribe other users. Is this correct?

I opened a discussion in CodePlex about this http://www.codeplex.com/tfseventsubscription/Thread/View.aspx?ThreadId=13059

Another question is what happends when only a custom field changes. Is the WorkItemChangedEvent thrown? It seems it is not...did I miss something?

Hope you can help!
Friday, August 03, 2007 10:36 AM by sole