Search code examples
restwebsockettfsazure-devopsworkitem

Azure DevOps Team foundation server project board live update?


Currently I'm programming my own app which communicates with TFS which is owned by my university through Azure DevOps REST API 5.1. I'm trying to accomplish my own frontend client which will display and handle project board with a lot of work items. I know how to create, update, get, etc... work items through REST API but now I'm trying to accomplish live updating board. That means if somebody else change something in the board, the changes are displayed immediately also on my instance of client.

Is this accomplished by websocket communication? If not what else is used? I saw that app's on azure devops has websocket functionality, but i have no idea how do i connect to websocket on backend.

I found something called SignalR service, some research about it needed.

Thanks for help!

P.S. I'm not from english speaking country so i'm sorry about my english.


Solution

  • You can check out the service hook and create web hooks in tfs. The web hook can be triggered by multiple workitem events(Work item created/deleted/restored/updated) to send a JSON representation of these events to any service. So that you can accomplish live updating board.

    1, First you need to write these endpoint services in your app to receive these posts triggered by the work item events.

    2, Create webhook in tfs. Go to Project Settings-->Service hooks-->Create subscription-->Select Web Hooks

    enter image description here

    Select a Trigger event(eg. work items updated)-->Enter your service endpoint url and other information.

    So that when a work item is updated in tfs board. The web hook will be triggered immediately to send out a post to your app service. Then your app service can process the received post and updated the changes on your instance of client.