Team System Developer Center >
Visual Studio Team System Forums
>
Team Foundation Server - Work Item Tracking
>
How to get an alert on work item change filtered by custom field substring?
How to get an alert on work item change filtered by custom field substring?
- Hello,I have a custom field in my work item (ErrorCode) of type String (also tried with PlainText).
I am able to enter a unique code into this string (i.e.: 404, 500, etc)I now want to create an alert to notify me on ANY work item that changes, that contains a key string (i.e. all work items that have a field ErrorCode with a substring '404')I tried to create an alert, specify the work item field (ErrorCode), but do not get the option of 'Contains', only 'Changes/Changes To/Changes From' in the 'Operator' field.Does anyone have any suggestions?Thank you.
Answers
- Hello again,
I think that you have already been using Alert Editor. However, there is a limitation in it. It is described in Brian's blog:
"One other thing people are likely to find confusing and/or frustrating is one particular characteristic of the work item tracking events. There are two kinds of fields in work item tracking (for the purposes of eventing) "Core fields" and "non-Core fields". Core fields are inherent to every work item type - State, Activated by, Activated date, Area path, Assigned to, Attached file count, Authorized as, Changed by, Changed date, Created by, Created date, Description, ID, Iteration Path, PortfolioProject, Reason, State, Title, Work Item Type and non-Core fields are all of the others. The eventing system works by creating an XML message for every change that happens in the system. Subscriptions work by running an XPath query over the XML message and sending alerts when the XPath query matches the message. In order to reduce the data volume and overhead of processing events, the XML message for work item tracking changes contains only core fields and any field that changes. It does not contain non-core fields that did not change. When using the Alerts Editor query builder, you will observe this distinction in the list of operators that are available for different fields. For non-core fields, you will only find "Changes", "Changes From" and "Changes To" because they are only available for matching if they change. For core fields, you will find =, <>, and other equality operators in addition to the "change" based operators. You can do this because they are always included in every message. There is no way to identify additional fields to be included in every message and I suspect you will find this limitation frustrating. We'll look at improving this in the future but that's going to require server changes. Despite this limitation, you can create some powerful new subscriptions with the Alerts Editor."
Since VS 2010 Power Tools hasn't been released yet, I couldn't tell you if it is fixed or not.
I suggest you to include the error code in one of the core fields like title and descriptions so that it supports "Contains".
Hope it helps.
Hongye Sun [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer byAnilCa Friday, October 30, 2009 12:20 PM
All Replies
- Hello again,
I think that you have already been using Alert Editor. However, there is a limitation in it. It is described in Brian's blog:
"One other thing people are likely to find confusing and/or frustrating is one particular characteristic of the work item tracking events. There are two kinds of fields in work item tracking (for the purposes of eventing) "Core fields" and "non-Core fields". Core fields are inherent to every work item type - State, Activated by, Activated date, Area path, Assigned to, Attached file count, Authorized as, Changed by, Changed date, Created by, Created date, Description, ID, Iteration Path, PortfolioProject, Reason, State, Title, Work Item Type and non-Core fields are all of the others. The eventing system works by creating an XML message for every change that happens in the system. Subscriptions work by running an XPath query over the XML message and sending alerts when the XPath query matches the message. In order to reduce the data volume and overhead of processing events, the XML message for work item tracking changes contains only core fields and any field that changes. It does not contain non-core fields that did not change. When using the Alerts Editor query builder, you will observe this distinction in the list of operators that are available for different fields. For non-core fields, you will only find "Changes", "Changes From" and "Changes To" because they are only available for matching if they change. For core fields, you will find =, <>, and other equality operators in addition to the "change" based operators. You can do this because they are always included in every message. There is no way to identify additional fields to be included in every message and I suspect you will find this limitation frustrating. We'll look at improving this in the future but that's going to require server changes. Despite this limitation, you can create some powerful new subscriptions with the Alerts Editor."
Since VS 2010 Power Tools hasn't been released yet, I couldn't tell you if it is fixed or not.
I suggest you to include the error code in one of the core fields like title and descriptions so that it supports "Contains".
Hope it helps.
Hongye Sun [MSFT]
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer byAnilCa Friday, October 30, 2009 12:20 PM


