sunny123

Hello!

I'm trying to subscribe to WorkItemChanged Event for different fields. Iobserved that the alerts work for inbuilt fields but not for the new fields I create.

Example, the following doesn't send any email alerts:

BisSubscribe /eventType workItemChangedEvent /address #mygroup@mycompany.com /deliveryType EmailHtml /server appserver /filter "\"PortfolioProject\" = 'MyTeamProject' AND (\"CoreFields/StringFields/Field[ReferenceName='MyCompany.TFS.BuildAndDeploy']/NewValue\" = 'Requested')"

The following sends email alerts:

BisSubscribe /eventType workItemChangedEvent /address #mygroup@mycompany.com /deliveryType EmailHtml /server appserver /filter "\"PortfolioProject\" = 'MyTeamProject' AND (\"CoreFields/StringFields/Field[ReferenceName='System.AssignedTo']/NewValue\" = 'DBA')"

Please assist me so I can send alerts in the first case too.

Thank you!



Re: Team Foundation Server - Work Item Tracking Bisubscribe not working for custom fields

Naren Datha - MSFT

Event have access to custom fields only when the value of a custom field changes. Otherwise it won't work in event filters and it is a limitation in V1. Filters are always available only for core fields.






Re: Team Foundation Server - Work Item Tracking Bisubscribe not working for custom fields

Tiago Pascoal

At first sight it seems you have a minor glitch on your Xpath. Instead of CoreFields your should use ChangedFields

Custom fields don't appear in the CoreFieldsNode only in the changedFields

try

BisSubscribe /eventType workItemChangedEvent /address #mygroup@mycompany.com /deliveryType EmailHtml /server appserver /filter "\"PortfolioProject\" = 'MyTeamProject' AND (\"ChangedFields/StringFields/Field[ReferenceName='MyCompany.TFS.BuildAndDeploy']/NewValue\" = 'Requested')"

To see if it works.





Re: Team Foundation Server - Work Item Tracking Bisubscribe not working for custom fields

sunny123

This command doesn't work either. I don't get any email notifications although bissubscribe says it subscribed for the event.

Can youpiint me to documentation on how to build the xpath may be I'll get a clue out of there.

Thanks!





Re: Team Foundation Server - Work Item Tracking Bisubscribe not working for custom fields

Naren Datha - MSFT

There is a document that comes with VSSDK that talks about the xpath syntax. It is easier to use a GUI tool to build the query, such as: http://www.codeplex.com/tfseventsubscription . You can use a system field to build query and then replace it with your custom field name.