我正在使用 VSO(Visual Studio Online API),我正在使用这个查询:
{
"name": "All Workitems",
"wiql": "Select [System.Id], [System.Title], [System.State] From WorkItems order by [Microsoft.VSTS.Common.Priority] asc, [System.CreatedDate] desc"
}
好吧,我期待一个带有 ID 标题及其状态的工作项列表,但作为回应,我只得到它的 ID 和 URL。我应该使用什么查询?
回复:
{
"queryType": "flat",
"queryResultType": "workItem",
"asOf": "2015-04-18T05:23:05.353Z",
"columns": [
{
"referenceName": "System.Id",
"name": "ID",
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/fields/System.Id"
},
{
"referenceName": "System.Title",
"name": "Title",
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/fields/System.Title"
},
{
"referenceName": "System.State",
"name": "State",
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/fields/System.State"
}
],
"sortColumns": [
{
"field": {
"referenceName": "Microsoft.VSTS.Common.Priority",
"name": "Priority",
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/fields/Microsoft.VSTS.Common.Priority"
},
"descending": false
},
{
"field": {
"referenceName": "System.CreatedDate",
"name": "Created Date",
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/fields/System.CreatedDate"
},
"descending": true
}
],
"workItems": [
{
"id": 7,
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/workItems/7"
},
{
"id": 6,
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/workItems/6"
},
{
"id": 5,
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/workItems/5"
},
{
"id": 4,
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/workItems/4"
},
{
"id": 3,
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/workItems/3"
},
{
"id": 2,
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/workItems/2"
},
{
"id": 1,
"url": "https://sami1212.visualstudio.com/DefaultCollection/_apis/wit/workItems/1"
}
]
}