This post is to report a known issue with alerts in Team Foundation Server 2012 Update 3 RC1. There is a partial workaround below, which should be applied to the configuration database BEFORE upgrade to RC1 if possible. This issue will be fixed in Update 3 RC2.
Description
This bug causes some alert subscription evaluations in TFS to fail with an exception (an XPathException), even though they are actually valid. Upon receiving the exception, the exception handler will treat the corresponding subscription as invalid and delete it. The alert will not be sent, and will be removed from the system incorrectly.
We believe this problem is fairly widespread, and customers who use their server regularly can expect to see the bug arise almost immediately after upgrade. It will occur as soon as an event (such as a check-in, creation of a work item, etc.) is triggered on the server.
Those affected by this bug will see errors in the following form:
[EntryInfo]
Message: TF53010: The following error has occurred in a Team Foundation component or extension...
Detailed Message: The subscription for contained an invalid condition ""PortfolioProject" = 'XYZ AND "CoreFields/StringFields/Field[Name='Created By']/NewValue" = '@@MyDisplayName@@' AND "CoreFields/StringFields/Field[Name='Authorized As']/NewValue" <>'@@MyDisplayName@@'"which could not be evaluated.
Exception Message: 'USER' as an invalid token. (type XPathException)
Workaround
If you are thinking of upgrading your server to Update 3 RC1, please apply the following script to your configuration database first. This script will not stop the alert evaluation exception from being thrown, but it will prevent the TFS notification job from deleting alert subscriptions. Instead, the alert will simply be skipped.
Note: If you have already upgraded to Update 3 RC1 and seen this issue occur, you will still benefit from applying the workaround. It will be too late to recover any deleted alerts, but the script will prevent any further subscriptions from being deleted. At this point it will be safe to re-create any alert subscriptions that were deleted.
DECLARE @registryUpdates typ_KeyValuePairStringTableNullable
INSERT @registryUpdates ([Key], [Value])
VALUES ('#\Service\Integration\Settings\RemoveBadSubscriptions\','False')
EXEC prc_UpdateRegistry 1, 'tfs admin', @registryUpdates, 1
We greatly appreciate the feedback we've gotten so far from those who have installed our RC's and hope you will continue to do so. Your input goes a long way towards ensuring our RTM releases are of great quality. For help applying the workaround, feel free to contact CSS. To report any additional issues you encounter, email tfcare a*t Microsoft d*ot com or open a bug on Connect.