如何在VSTS中创建临时查询? createquery()只创建,getquery()给出错误?

问题描述 投票:0回答:1
let query = "Select [System.Id], [System.Title], [System.State] 
            From WorkItems Where [System.WorkItemType] = 'Bug' 
            order by [Microsoft.VSTS.Common.Priority] asc, [System.CreatedDate] desc";

client.getQuery("DMPLM_TP1", query).then ((wi) => {}, (query) => {});

错误:TF401243:查询选择[System.Id],[System.Title],[System.State]来自WorkItems [System.WorkItemType] ='Bug'顺序由[Microsoft.VSTS.Common.Priority] asc,[ System.CreatedDate] desc不存在,或者您没有权限读取它。

typescript azure-devops
1个回答
0
投票

不,您无法创建临时查询,但可以通过queryByWiql函数使用查询字符串检索工作项。

IPromise<Contracts.WorkItemQueryResult> queryByWiql(wiql, project, team)

有样本:WorkItemSearch.ts

© www.soinside.com 2019 - 2024. All rights reserved.