首页 > 解决方案 > TFS2015 - 显示所有共享和用户拥有的通知及其所有者

问题描述

我正在尝试编写一个 SQL 查询,该查询将在 TFS 2015 On-Premise 上的更改通知中列出所有共享和用户拥有的 VSTS。根据我的研究,通知应该存储在 tbl_EventSubscription 表中,但那里没有关于事件是用户拥有还是共享的信息,只是订阅者的 SubscriptionID,我不知道在哪里搜索所有者。

如果有可能用 REST API 解决这个问题,它也会有所帮助。

任何帮助或指导将不胜感激。

标签: mysqltfsnotificationstfs-2015

解决方案


好吧,我想我明白了:

   SELECT Notif.Id AS 'Notification Id',
          Notif.EventType AS 'Event Type',
          Notif.Classification AS 'Notification Classification',
          Const.IdentityDisplayName AS 'Notification Owner'
     FROM [Tfs_Development].[dbo].[tbl_EventSubscription] Notif
LEFT JOIN [Tfs_Development].[dbo].[Constants] Const ON Const.TeamFoundationId = Notif.SubscriberId
 ORDER BY Notif.Id

@PatrickLu-MSFT 我不知道为什么,但我在 Tfs_Configuration 中没有 tbl_security_identity_cache,但我在 Tfs_Development 中有它并且它是空的。我使用 Tfs_Configuration.dbo.tbl_Identity 作为用户名的参考,但它没有返回团队订阅者甚至一些用户的名称,所以最后我将使用我的解决方案。

谢谢您的帮助。


推荐阅读