The Ramblings of Two Microsoft .NET Developers, TFS, and Visual Studio ALM Guys --- "Yes, we are both named Ed."

IEventService: Filter Expressions, Event Types



When playing around with this Interface you will notice that it is very easy to subscribe and unsubscribe to events via the TFS Object Model.
The method signature for Subscribing to an event is:

 

int SubscribeEvent (
        string userID,
        string eventType,
        string filterExpression,
        DeliveryPreference preferences
)
 

As you can note there is several string values that are needed to pass in. I found no documentation on what eventTypes
or Filter expressions were available.  Hopefully the following information will help you as you develop with the
Object Model.

UserID: simple enough. 
eventType: Out of the Box
  • AclChangedEvent
  • BranchMovedEvent
  • BuildCompletionEvent
  • BuildStatusChangeEvent
  • CheckinEvent
  • CommonStructureChangedEvent
  • DataChangedEvent
  • IdentityCreatedEvent
  • IdentityDeletedEvent
  • MembershipChangedEvent
  • NodeCreatedEvent
  • NodePropertiesChangedEvent
  • NodeRenamedEvent
  • NodesDeletedEvent
  • ProjectCreatedEvent
  • ProjectDeletedEvent
  • WorkItemChangedEvent

To view event types on a certain TFS server you can consume http://ServerName:8080/Services/v1.0/Registration.asmx to enumerate through the list
or, you can use the IRegistration interface and loop through each RegistrationEntry for each EventType.

Filter Expression:

  • PortfolioProject
  • System.AreaPath
  • System.AssignedTo
  • System.AuthorizedAs
  • System.ChangedBy
  • System.ChangedDate
  • System.Id
  • System.IterationPath
  • System.OpenedBy
  • System.Reason
  • System.State
  • System.Title
  • System.WorkItemType

Example expression:

Condition String = "PortfolioProject" = 'Project Name' AND ("CoreFields/StringFi
elds/Field[ReferenceName='System.AssignedTo']/OldValue" = 'Ed Kisinger' OR "Core
Fields/StringFields/Field[ReferenceName='System.AssignedTo']/NewValue" = 'Ed Kis
inger') AND "CoreFields/StringFields/Field[ReferenceName='System.AuthorizedAs']/
NewValue" <> 'Ed Kisinger'

 
Ed K.
Posted in TFS | VSX


Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview