Search code examples
azuretfswiquery

Is there a way to generate or get tempQueryId from Copy Query URL in TFS query editor?


In previous version I had a functionaly to download a .wiq file and it opens inside visual studio. From there I could go to web version of query editor.

Link is similar to: http://tfs/_queries/query/?tempQueryId={Guid}&resultsEditorContext=query-edit

For now application is a TFS extension and I want to open web query editor from there.

So the problem is how to get or generate this tempQueryId.

Thank you for your help!


Solution

  • At present, you still could be able to download the .wiq file.

    1. Select the Edit query wiql

    enter image description here

    1. In the pop-up web dialog, click Export

    enter image description here

    1. Choose save it will be download as New Query 1.wiq in local file system

    enter image description here

    Besides, there are two ways to share a query, Email query items or share a query URL.

    If share a query with Copy query URL, it will generate a temp query id, which is not allow others to access the query path. This should be the same temp query ID which you mentioned.

    However, there isn’t the method or property to get the temp query id. Also, from collection database, there isn’t the table for that information too. Take a look at this similar question here.