在我的task.json中,我在这样的选择列表中显示区域路径:
"Inputs":[
{
"name": "bugAreaPathChildren2Dropdown",
"type": "picklist",
"label": "Area Path Children 2 Dropdown",
"defaultValue": "",
"required": false,
"helpMarkDown": "Area path where bugs should be created",
"visibleRule": "createBugsChecked = true"
}
]
"sourceDefinitions": [
{
"target": "bugAreaPathDropdown",
"endpoint": "/$(system.teamProject)/_apis/wit/classificationnodes/areas?api-version=5.0",
"selector": "jsonpath:$.name",
"keySelector": "jsonpath:$.id",
"authKey": "tfs:teamfoundation"
},
{
"target": "bugAreaPathChildrenDropdown",
"endpoint": "/$(system.teamProject)/_apis/wit/classificationnodes/areas?$depth=2&api-version=5.0",
"selector": "jsonpath:$.children[*].name",
"keySelector": "jsonpath:$.children[*].name",
"authKey": "tfs:teamfoundation"
}
]