Share via


Multiple Queries Open in MTM

I mentioned this a while back, but it is an easy thing to forget so I bears repeating for everyone who is using Manage Queries in MTM. If you want to have multiple queries open, there is a way to do it.

Say you open MTM and Manage Queries. You click on a query which is loaded into the top right. Press the Run button and the query is executed. Results appear in the lower right pane.

If you click on another query, you’ll lose the results of the first query.

If you begin editing the query, then the hierarchy pane will become disabled. Hovering over the tree view tells you that you need to save or revert your changes.

Query being edited warning

In either case, you may want another query open without losing the first, or having to save/revert the first. Manage Queries is a hybrid of the two types of views we have in MTM. The first is what we call a manager page; it is single instance. Now matter how you get to it (navigation bar, back/forward) you’ll bring up the same instance that was already running. The second are artifact views which are more or less multi-instance. That is, I can have many work items open but not two views of the same work item. Other multi-instance views include test results, test runs, configs, and test plans. Generally, multi-instance views are artifacts.

At first Manage Queries behaves like a single instance. Open it, navigate away, then reopen it via the navigation bar. You’ll get the same instance. However, unlike all other single instance views Manage Queries appears in the Open Items list.

Queries view navigation bar link

Once you select a query to view, reopening Manage Queries from the navigation bar will give you a second instance. Now the Open Items list will grow by 1, and you’ll see 2 instances of Manage Queries in it.

image

Hope this helps!

Cheers,

David

Comments

  • Anonymous
    September 27, 2011
    Thanks David that Definately helps!! but I find the behavior bit confusing, I mean you give the user the flexibility to open another instance to edit or view same/other queries but just not through the same instance, why not just get him to whatever queries he wants through that instance itself?

  • Anonymous
    August 20, 2015
    No idea what this article is saying!