在TFS中,团队可以与多个AreaPath关联。我想检索AreaPath和TeamName之间的映射。 TFS数据库中是否有任何具有映射的表?或任何REST API来检索该数据?
答案 0 :(得分:0)
您可以尝试使用Team field values Rest API。
团队字段用于识别属于您的工作项 球队。默认情况下,区域路径是团队字段,但它可以是任何字段 领域。使用此API来获取和设置团队字段值。
获取团队字段值
GET https://{instance}/DefaultCollection/{project}/{team}/_apis/Work/TeamSettings/TeamFieldValues?api-version={version}
将返回包括三个区域路径:
默认为Fabrikam-Fiber\\Auto
和"Fabrikam-Fiber\\Fiber"
以及"Fabrikam-Fiber\\Optics"
"field": {
"referenceName": "System.AreaPath",
"url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/wit/fields/System.AreaPath"
},
"defaultValue": "Fabrikam-Fiber\\Auto",
"values": [
{
"value": "Fabrikam-Fiber\\Auto",
"includeChildren": false
},
{
"value": "Fabrikam-Fiber\\Fiber",
"includeChildren": false
},
{
"value": "Fabrikam-Fiber\\Optics",
"includeChildren": false
}
答案 1 :(得分:0)
SELECT area.id, path.[AreaPath],ADObjects_team.SamAccountName, teamproject
FROM [dbo].[tbl_TeamConfigurationTeamFields] config
inner join [dbo].[ADObjects] ADObjects_team on config.[TeamId]= ADObjects_team.[TeamFoundationId]
inner join [dbo].[tbl_ClassificationNode] area on config.[TeamFieldValue] = area.[Identifier]
inner join [dbo].[tbl_ClassificationNodePath] path on area.id = path.id
where arealevel1='Area'
order by [AreaPath]