My team recently began looking at possibly migrating to a new TFS configuration where we would enable several dev groups with related components/systems that previously had separate dev management systems and bring them into one team project. One of the first things that we wanted to make sure was possible was the ability to get alerts for only check-ins directly in our section of the codebase and for all changes to workitems connected to our efforts.
I was familiar with bissubscribe.exe somewhat and knew that there was filtering capability so I began looking around. I was amazed at how little documentation there is out there for working with VSEFL (Visual Studio Event Filtering Language). I found some here and Clark Sell has some stuff here. Clark references a link that say you will find everything you want to know and more at it about Eventing well I would have to disagree because there is not good documentation for VSEFL and how to use it effectively.
Here is how it all worked out.
This was the easy part – Buck Hodges had the answer in one of his blog posts and so I just took that and modified it with my path information and away we went – it all worked.
I thought this one was going to be likewise easy with Naren’s tool. Unfortunately it doesn’t produce filter expressions that work with Bissubscribe.exe. The way the command-line wants the single and double quotes is different than Naren generates and so I was getting invalid subscriptions created. They were invalid because they didn’t have single quotes around the System.IterationPath string in part of the filter and without the quotes the filter just wouldn’t work. It took quite a bit of playing to figure out how it should work, but in the end I ended up with a working bissubscribe.exe call to have a filter for only those workitems that fell under a certain Iteration Path which is how we are choosing to segment our subprojects within our Team Project. Below is the final call with some of my specific info stripped out (like my email address!)
BisSubscribe.exe /eventType WorkItemChangedEvent /deliveryType EmailHtml /server someserver:8080 /address firstname.lastname@example.org /filter "PortfolioProject = 'FSM DSS' AND ("CoreFields/StringFields/Field[ReferenceName='System.IterationPath']/NewValue" MATCH '\FSM DSS\TSS.*' OR "CoreFields/StringFields/Field[ReferenceName='System.IterationPath']/OldValue" MATCH '\FSM DSS\TSS.*')"
Notice the before the double quotes at the start of the CoreFields… and then the before the close double quotes at the end – those were crucial – but I don’t know why – I suspect it is some escape at the command line that I should know – but it worked and perhaps someday I will look it up to try and understand it. If you know please leave a comment explaining it to me!
I hope this helps someone somewhere such that they have an easier time figuring this out then I did