Retrieve the WIQL of a saved query created in TFS

三世轮回 提交于 2019-12-11 00:57:28

问题


I have created a query in TFS interactively using the web interface. Now I want to get the WIQL that it is using.

The only way I know how is to call the RESTful api, and pass $expand=wiql. Is there an easier way? Ideally from the interactive web interface?


回答1:


Doesn't seem like you can do it in the Web Access. You can however do it in Visual Studio (if you have it).

Open the Query and then Edit it, now if you do File, Save as... you can then save the query as a .wiq XML file, that will include the WIQL:

Example content:

<?xml version="1.0" encoding="utf-8"?>
<WorkItemQuery Version="1">
    <TeamFoundationServer>https://----.visualstudio.com/defaultcollection</TeamFoundationServer>
    <TeamProject>Test Agile</TeamProject>
    <Wiql>SELECT [System.WorkItemType], [System.Title], [System.State], 
    [Microsoft.VSTS.Scheduling.StoryPoints], [System.IterationPath], [System.Tags] 
    FROM WorkItemLinks 
    WHERE Source.[System.WorkItemType] in group 'Microsoft.RequirementCategory' 
</WorkItemQuery>


来源:https://stackoverflow.com/questions/38335488/retrieve-the-wiql-of-a-saved-query-created-in-tfs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!