Visual Studio Team Services

Beware of the TFS PickWorkItemsControl

While finishing a new functionality for a TFS-based application that utilizes Microsoft’s PickWorkItemsControl it became apparent that it does not behave as expected and does not return the actually selected WorkItems inside that control in all circumstances.

Particularly once the WorkItems are loaded inside that control and selection occurs in combination with applied sorting the WorkItems returned from the .SelectedWorkItems() method returns the WorkItem instances that are visually at the place the previously selected ones were placed at.. as if the visual index is out of sync with the underlying datasource-related index.

What this means is that the returned WorkItems are not (necessarily) the ones the user chose, including the same work item being returned multiple times instead of other selected ones.

This happens in the VS2010 version of the control but it seems like this behaviour remained unchanged / unfixed up until TFS/VS2013 Update 1.

So if you utilize this built-in functionality in your applications you might want to evaluate whether and how this affects you.

*Update:

I’ve reported this issue to Microsoft and it has been reproduced. If you need / want to, you can follow the MS Connect item for future updates.

*Update #2:

The bug has been confirmed but already been closed with WONTFIX. Oh well. Custom dialog it is then..

Discussion

Comments disabled.