VSTS/TFS Extension - Reflect changes in Grid/Board without refreshing entire page

547 Views Asked by At

I've written an extension for VSTS/TFS which adds a context menu for creating child work items. The creation of the work items works well, but the change is not reflected in the Grid/Board until I perform a Refresh of the entire page.

Is there a way to refresh just the affected work items (somewhat similar to the refresh performed by the '+' menu item)?

3

There are 3 best solutions below

1
On BEST ANSWER

As far as I know this is currently not possible.

I struggled with that question for quite some time before I gave up and just told my users to hit F5 after creating the new work items. The NavigationService is the best alternative i know of.

2
On

There isn't any way to achieve this. If you open two pages and click "+" button to add two different child workitems from the two pages in the same time, you will find that the affected work item is not real refreshed, it just show the new added one. And you cannot control the behavior on Grid/Board either since the VSTS extensions are hosted in iframe which is cross-origin.

0
On

For your specific case, this doesn't help you. However, if anyone runs across this question looking for ways to refresh a work item, you can use the work item form service method "refresh":

https://www.visualstudio.com/en-us/docs/integrate/extensions/reference/client/api/tfs/workitemtracking/services/workitemformservice#refresh

This service is a means to interact with the currently active work item form. So, this refresh will work on a work item that the user has opened.