We are setting up a new Azure Devops Board to track all of our work. Some of the projects being tracked are in a different board managed by a different team (under a different Organization).
We would like to be able to link these other Stories, Features, etc. to be linked to our board too so that we only need to write the update in one place.
I know it is possible to create a hyperlink directly to the existing Board, but not all of the users (e.g. leadership team) on the new board will have access.
So is it possible to somehow write an update in one place and have it update on another Board too?
We have created a hyperlink for testing purposes but users that didn't have rights to the existing Board were unable to access it, which is perfectly expected. I haven't found any other way to link the data from one Board to another.
Based on your description to synchronize certain fields of work items between 2 boards from 2 Azure DevOps organizations, I am afraid there is no out-of-box feature as of now. As discussed, to customize an automated workflow for such requirement, the mapping information between the two WITs has to be restored somewhere manually first, so that the workflow is aware which WIT in the target organization should be updated when the WIT in the source organization is modified.
Since the pipeline feature of Azure DevOps itself is an automation tool and we can use a custom field in the WIT to restore the mapping information, I have figured out a custom workflow within Azure DevOps. Let's assume we need to synchronize the two WITs namely
UserStory1 of ProjectA from OrgA(as the source WIT) andUserStory2 of ProjectB from OrgB(as the target WIT). Here is the design.Prerequisites and optimizations taken into consideration
To trigger the pipeline when
UserStory1 of ProjectA from OrgAis updated, we can subscribeWIT UpdateWeb Hook event inProjectAand monitor the event from source Project/org in a pipeline ofProjectBby Web Hook resource in YAML pipeline;To update
UserStory2 of ProjectB from OrgBwith the information extracted from Web Hook payload, we can call this API inInvokeRESTAPI@1pipeline task; this task is an agentless job supported task, which doesn't request to use a pipeline agent machine; hence, it can save time for agent assignment and won't cause any agent job to be pending in the queue of an agent pool, either; (the simple job only takes 1-2 seconds to complete;)Per the authentication of the API request, we can use
$(System.AccessToken)of the pipeline service account, which can not only avoid the risk of Personal Access Tokens leakage, but is also less prone to getting throttled by Rate usage limits;Steps to generate a sample workflow
Create custom fields in inheritance process for WITs in both source and target organizations to track the mapping WIT IDs;
Create an
Incoming WebHookservice connection in the target organization (OrgBin this sample) and keep notes of the Web Hook name (ADOWebHookWIT) and service connection name (ADOWebHookWITSvcCnn);Generate the Web Hook URL and subscribe the WIT update event in the source organization (
ProjectAinOrgA);Create
Genericservice connection like below inProjectBfor the pipeline taskInvokeRESTAPI@1;Create a new YAML pipeline in
ProjectBwith the.ymlfile contents below to monitor the Web Hook events sent fromOrgA; make sure the pipeline service account is granted permission to edit work items in the expected area path (Edit theSecurityof project root node in my case);UserStory1 of ProjectA from OrgA, the pipeline ofOrgBreceived the WIT update event sent fromOrgAand then pipeline was automatically triggered and updatedUserStory2 of ProjectB from OrgB(#615) via API with the information transferred in the payload; we can see the organization name and project name information were not restored in each WIT, as the values were retrieved by the pipeline predefined variablesSystem.TeamFoundationCollectionUriandSystem.TeamProject. Therefore, this benefits us from creating additional custom fields, but requires that the pipeline and the target work item are from the same project.If you would like to synchronize more fields, you can modify the request body accordingly. Hope the sample workflow for your reference may help.