Wednesday, February 27, 2008

[VSTS] Problem with Bissubscribe and keyword 'NOT'

[Update: Problem described in this blog entry has been solved in TFS 2008 SP1.]
When called twice with the same arguments bissubscribe doesn’t do anything on the second call i.e. there is no additional second event subscription added. Normally it is safe to call bissubscribe with the same arguments as many times as you like – you will get only one subscription.

But, there is a know bug that causes problems if the filter expression contains the keyword 'NOT'.

If the filter contains ‘NOT’, if called multiple times with the same arguments, bissubscribe will not detect that the arguments are the same and will create a new subscription every time you call it.

Here is a generic sample to repro the problem:

If called twice following line will create two subscriptions
BisSubscribe.exe /eventType WorkItemChangedEvent /address http://tfs2k8/Notifications/EventHandler.asmx /server http://tfs2k8:8080 /filter "NOT \"PortfolioProject\" = 'a'"
whereby if we remove NOT from the filter expression only one subscription is created.


Suggested workaround is to use the operator ‘<>’ instead of the keyword ‘NOT’.


Following call works fine i.e. can be called multiple times and will result in one subscription only:
BisSubscribe.exe /eventType WorkItemChangedEvent /address http://tfs2k8/Notifications/EventHandler.asmx /server http://tfs2k8:8080 /filter " \"PortfolioProject\" <> 'a'"

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home