We have recently fully migrated our old fat (Microsoft.TeamFoundation.WorkItemTracking.Client
) client code to use WorkItem REST API instead.
The issue is that our old code saved WorkItems using the WorkItem.Save(SaveFlags.MergeAll) calls
WorkItem.Save(SaveFlags.MergeAll)
that was resilient against compatible concurrent changes.
While new code is plain
WiClient.UpdateWorkItemAsync(updates, Id, expand: WorkItemExpand.All)
that will unfortunately sometimes result in
Microsoft.VisualStudio.Services.Common.VssServiceException: TF26071: This work item has been changed by someone else since you opened it. You will need to refresh it and discard your changes. at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.d__53.MoveNext()
because of some irrelevant concurrent changes.
So, is there an analogue to WorkItem.Save(SaveFlags.MergeAll)
with REST API, or do we have to handle such failures manually where appropiate?
P.S.: Well, I understand that there are probably no analogues, but...
Unfortunately, REST API doesn't have this function. You would just try to rerun your api.
If you do want this function, you may submit a user voice at the website below:
https://developercommunity.visualstudio.com/content/idea/post.html?space=21