Freigeben über


A tool to create Work Item expressions & manage subscriptions

Update on 7/29/2008: A much more powerful and integrated tool is released now as Power Tools. Check out screen shots, features and download: https://blogs.msdn.com/bharry/archive/2008/07/08/july-08-tfs-power-tool-preview.aspx  

When I was going over past forum questions, I saw that many were having trouble creating filter expressions for event subscriptions, and managing subscriptions. We do have bissubscribe.exe tool that helps with creating subscriptions. But creating subscription expressions is hard because of its syntax. Also, that tool doesn't give a way to view existing subscriptions to unsubscribe them.

Sam, a formal WIT colleague, developed a tool to help creating workitem tracking subscriptions, but we couldn't make it a powertoy. I have attached the source for this as  sample code in this post. This source can be built and this can be used as 1) a tool as described above and 2) as a sample to do basic operations with IEventService and ICommonStructureService interfaces.

Here is a screenshot on creating workitem change event expression. It works similar to workitem query builder, but without features such as grouping. The brackets for grouping can be added in Generated XPath textbox, and subscription can be created.

Here is screenshot that shows the existing subscriptions and a way to unsubscribe.

For FAQ on common problems with alerts & troubleshooting, check my post https://blogs.msdn.com/narend/archive/2006/07/27/679571.aspx

[update 4/2/07: Now there is a codeplex project at https://www.codeplex.com/tfseventsubscription to build another tool to achieve this]

//This posting is provided "AS IS" with no warranties of any kind and confers no rights.  Use of samples included in this posting is subject to the terms specified at https://www.microsoft.com/info/cpyright.htm.

WorkitemEventSubscriptionTool.zip

Comments

  • Anonymous
    July 26, 2006

    I was collecting links & pointers to answer common questions in forums related to TFS eventing...

  • Anonymous
    July 26, 2006
    Un poco de antecedentes:
    Uno de los mecanismos más eficientes para la colaboración que incluye Team...

  • Anonymous
    July 27, 2006
    Subscribing to the TFS Events using bissubscribe.exe is a powerful way to receive notifications for many...

  • Anonymous
    October 12, 2006
    I was collecting links & pointers to answer common questions in forums related to TFS eventing and

  • Anonymous
    November 02, 2006
    There is a lot of useful free utilities for Team System you can find spread all over the web. Some of

  • Anonymous
    December 12, 2006
    This is the second article about Ten Must-Have Tools Every TFS User Should Download Now. This article

  • Anonymous
    December 13, 2006
    This is the second article about Ten Must-Have Tools Every TFS User Should Download Now. Part I discusses

  • Anonymous
    February 26, 2007
    Jeff has posted a nice GUI for creating event subscriptions. This tool makes the process less arcane

  • Anonymous
    February 26, 2007
    The Team Alerts dialog lets you subscribe to basic email alerts on a Team Project such as: My work...

  • Anonymous
    March 08, 2007
    I received this from a colleague today and it’s so helpful I thought I’d post it to my blog

  • Anonymous
    March 08, 2007
    TEAM FOUNDATION SERVER Utilities Capacity planning spreadsheet and tools (Unsupported) Team Foundation

  • Anonymous
    March 11, 2007
    A dump, of various tools, thanks to Zeeshan Shah. Note: this is not an endorsed list. Utilities Team

  • Anonymous
    April 23, 2007
    I have used this tool with mixed results.  Is there a plan to clean it up?  For instance, it does not show in the "manage subscriptions" who it is going to.  Also, there is no way to edit an existing one that I can find.

  • Anonymous
    May 01, 2007
    Thanks, I've been looking for a clear explanation of how to write Filters for the WorkItemChanged Event.   I have created other functionality for TFS and bypassed the ICommonStructureService and went directly to the service.  Pardon for asking, but what is gained by using this proxy. mgphillips1@gmail.com

  • Anonymous
    August 07, 2007
    Hi, if the AssignedTo = "LastName, FirstName", it doesn't seem to be working. Comma is taken as "OR". Is there an escape character for comma?

  • Anonymous
    February 07, 2008
    Hi I use  the  tool  .   If  i   want  that  "send  to "  field   should  have  the  email  id   of  the  person  to  whom   i  am  assigning   the   WI ,  then  what  to  do ? Thanks

  • Anonymous
    February 08, 2008
    Unfortunately that is not possible yet in V1 Raman. We are working on improving these scenarios for next release.

  • Anonymous
    May 07, 2008
    Naren - I downloaded the tool.  Its extemely helpful.  I am trying to extend it to be able subscribe to event on behalf of others.  Instead of retrieving my ID, I added a field to be able to enter the ID for whom the event is being subscribed.  However, now matter what I include for the UserName parm of the Subscribeevent method, the event is always attached to my ID (in the tbl_subscription table).  I tried entering the users SID as well (from the tbl_sequence_ids table int he TFS DB) to no avail.   Do you know whether using the SubscribeEvent method in this fashion is even possible?

  • Anonymous
    May 07, 2008
    Patrick, we are working on a powertool to do what you are asking (even there the event itself will be associated with creater). we hope to release in next 3-6 months.

  • Anonymous
    May 07, 2008
    My bad, I was not seeing this clearly.  It doesn't really matter what the SID of the subscription notification is.  That is merely the person who created it.  What does matter is the filter and the email address.  I should be able to extend the tool in the manner in which I was thinking.  I will be watching for updates to the tool. Thx for the quick response.  

  • Anonymous
    July 28, 2008
    Hi, what if we had Scarlett O'Hara as a member of our development team and we would want to set up email notification for this user name - the apostrophe will destroy the valid xPath syntax: ("CoreFields/StringFields/Field[ReferenceName='System.AssignedTo']/NewValue" = 'Scarlett SOH. O'Hara' OR "CoreFields/StringFields/Field[ReferenceName='System.AssignedTo']/OldValue" = 'Scarlett SOH. O'Hara') Is there any way to get around this issue? Already tried escaping the apostrophe with and ' Thanks, Steve

  • Anonymous
    July 28, 2008
    Hi again, got it working by changing the outer single quotation marks to double as follows: ("CoreFields/StringFields/Field[ReferenceName='System.AssignedTo']/NewValue" = "Scarlett SOH. O'Hara" OR "CoreFields/StringFields/Field[ReferenceName='System.AssignedTo']/OldValue" = "Scarlett SOH. O'Hara") Steve

  • Anonymous
    September 29, 2008
    Hi, Do you know where I can find the xpath reference of the other fields in TFS? I am trying to create a notification everytime someone adds my name in the QA field. Cheers! Ryan

  • Anonymous
    November 14, 2008
    Could you add support for more work item fields? For example, I'd like to receive an e-mail when someone changes the estiamtion field, or the date field, etc. Thanks!

  • Anonymous
    May 27, 2009
    The comment has been removed

  • Anonymous
    January 06, 2010
    thanks masykur, that solved the problem

  • Anonymous
    August 24, 2010
    Hi ,           Are you upgrading tool for TFS 2010 r any other alternate to perfrm this tasks.