cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anka
Helper II
Helper II

Error 400: Trying to update Azure DevOps using a flow

Hi, I am facing some trouble updating a field in DevOps(user story) through a flow. The error code I get is 400. "At least one operation is required for Apply".

 

This is a pretty simple flow that looks for any update in DevOps user story and then updates a specific field with some calculated values.

 

Here are a few scenarios that I have tried:

 

  1. I tried to set some other values e.g. Title and it works there.
  2. I am sending an email with the calculated value in it, which shows the right value. So I know the formula is correct.
  3. I tried to hardcode the value of that field(not through the formula but assigning an integer number) and that also did not work.

Here is a screenshot of the flow and 

2020-02-27_17-35-57.jpg

Any suggestions here?

 

 

Thanks,

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @anka ,

I have made a test on my side to create a New Decimal column with Decimal type and the flow could also works on my side.

1.png

2.png

 

I see your flow has trigger when a work item is updated and action update a work item, this would cause a loop for the flow and we couldn't create a flow for update the work item when the work item is updated.

 

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-alzhan-msft
Community Support
Community Support

Hi @anka ,

 

I have made a test on my side and don't have the issue that you mentioned.

 

Does the ['Custom_CD3WeightedValue]} is the column name? What is the column type of the ['Custom_CD3WeightedValue]} column?

 

I have made a test to create a number type column "New Int" and create a flow as screenshot below:

1.png2.png

I'm use the same expression with you:

 

div(mul(int(variables('Urgency')),int(variables('Value'))),div(variables('Hours'),80))

 

 

The flow would run successfully as below:

3.png

 

 

Please take a try to create a number column and make a test again to see if your flow would works.

 

Link below about create column for work item for your referance:

https://docs.microsoft.com/en-us/azure/devops/organizations/settings/work/add-custom-field?view=azur...

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hey Alice (@v-alzhan-msft), thank you for your response.

 

Yes, Custom_CD3WeightedValue is a custom value and datatype is Decimal. 

 

I noticed that you are using a Create work item instead of the Update work item. Could you please try to Update like our flow and let me know if that works for you? Creating a work item would create duplicate values in DevOps.

 

 

Thanks,

 

I'm having the same problem trying to update a custom Azure DevOps field using the Update Work Item action in Power Automate. I've tried several permutations of field data types and variable data types, float, decimal and int.  I've also tried updating with a simple integer not stored in a variable.  I still get the same error.

v-alzhan-msft
Community Support
Community Support

Hi @anka ,

I have made a test on my side to create a New Decimal column with Decimal type and the flow could also works on my side.

1.png

2.png

 

I see your flow has trigger when a work item is updated and action update a work item, this would cause a loop for the flow and we couldn't create a flow for update the work item when the work item is updated.

 

 

Best regards,

Alice       

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Alice,

It seems like we're able to update other out of the box fields on update, but not custom ones.

Is it possible to not trigger the update action when power automate updates, or auto calculate a field in DevOps without Power Automate?

anka
Helper II
Helper II

We were able to stop the workflow by adding a Yes/No condition. If the value that we are trying to update is already present, we terminate the workflow, or else we execute it.

 

E.g. Say we are updating Cost of delay using a formula.

At Devops item modified action the workflow starts and looks for the Cost of delay field, and if is already set to what it should be according to the formula, it terminates, or else it sets the field according to the formula. This stopped the infinite looping in the item.

@v-alzhan-msft 

I've read your solution reply and take note of your comment about flows triggered by a work item update will trigger a never ending flow of updates.

Can you recommend a solution in which I can specify
When a work item is updated
And a specific field has been changed
Then execute this flow
Or End

to break the never ending loop?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,152)