cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dmorland
Frequent Visitor

Updating work item in Azure Devops fails. TF26071

I have some Flows that update a work item in Azure Devops by adding a comment.  I am using the Send HTTP Request to Azure Devops action with this request https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments/add?view=azure-devops-rest-5.1

 

Occasionally it fails with error "TF26071: This work item has been changed by someone else since you opened it.  You will need to refresh it and discard your changes."

 

Is there any way I can prevent or handle this error?

 

3 REPLIES 3
chrissahagun
Resolver II
Resolver II

Your previous steps on the same work item might still be in process as the HTTP request is sent?  Try using the Delay step and have your flow pause for a couple of seconds.

 

chrissahagun_0-1615963027621.png

 

🤞

 

There are no preceeding steps that make any update to the work item.  I suspect it is some kind of conflict with a change that is being made to the work item by another user in the Azure DevOps GUI.  As far as I am aware, concurrent changes to the item are merged on each save unless the changes are to the same field which might result in a conflict.  But if I run my Flow which adds a comment while I also have it open in the GUI adding a comment I don't get this error.  The error is only happening once in every hundred or so runs.

This update is the last action in the Flow so I am thinking one option might be to add a subsequent on-fail action to retry the same update

As I was reading your response, I thought of suggesting a retry on error.  And then I got to your last line!

 

I think you should try it! like a "configure run after" thing on a condition, right?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,700)