I am automating some behaviors in azure devops using logic apps in Visual studio. One of the flows is to create a work item when a different work item type is created. The issue is that the flow trigger fires endlessly while only one work item is created

I have tried the following: * Delete the app and redeploy it * Delete the resource group and all its contents, create a new project and redeploy it

The full flow criteria

The flow runs more than it should

Update 1:

I did notice that the app triggers endlessly but only for the work items created after its deployment. So, it ignores all previously created work items

2 Answers

Community On

I think your "Foreach" loop is missing an "Until" loop to end the loop.You can build the loop's exit condition by selecting the Limit variable and the is equal operator in "Until" loop.

To run and repeat actions until a condition gets met or a state changes, put those actions in an "Until" loop. Your logic app first runs any and all actions inside the loop, and then checks the condition or state. If the condition is met, the loop stops. Otherwise, the loop repeats.

For details,please refer to https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-control-flow-loops

user3319622 On

Have you tried with a 'Condition' after 'When a work item is created 2', perhaps the trigger condition on the field Type does not work as expected on that datatype? I worked on a case where the 'sql get-rows' where would either return everything or nothing because the connector only supported a specific type of DateTime.

So a condition that would check for the value of Type to be "Test Sales" before moving on to the initialize variable.