cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frank84
New Member

VSTS create task on work item creation loop

Whenever my team creates a new backlog item, I want some default items to be created automatically.

To do so, I've created a test flow which for some reason keeps looping.

The relevant flow part is as follows:

flow2.png

 

Since type isn't used, I filter using a condition, where the work item is equal to "product backlog item".

The resulting workitem types are configured as follows:

 

 

flow.PNG

The postback goes to the right backlog item, however, an infinate loop is created for some reason, in which the items keep getting added over and over again. 
The recurrence interval in "code view" states a five minute interval, but I see no option to not re-occure. 

 

Furthermore, each trigger for a new backlog item, simply seems to query all product backlog items in which  the state is still "new". So seach new item, creates tasks for all existing items with status "new" in which the team filter also fails completely

 

flow create task.png

 

Anyone able to tell what I'm missing?
Or is the flow trigger simply buggy?

 

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

Hi @Frank84 ,

 

Could you share the specific configuration of the action?

It seems that Flow is triggered again after Create a work item action is executed.

If the Account Name, Project Name, and Type set in the trigger are consistent with those configured in Create a work item action, a loop will be formed.

5.PNG

If the new work item type in the trigger and the item type created in Create a work item action are inconsistent, please specify them separately to avoid looping.

6.PNG

 

Best Regards,

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

Hi @v-bacao-msft ,

 

Thanks for your response.

 

Currently, I have no filter on type, since when creating a backlog item, type is by default empty  (i've tried all which result in no created tasks at all).

To work around this, I've created a condition variable, if "Work item type" (which is populated by default), is equal to Product backlog item. 

I also used to filter on the team name on the "when item created" part, however, this results in any new item within the entire organization, not just my team. 

To work around it, I've populated the Area Path to the path of my team instead.

 

If no, nothing happens, which is good.
If yes, tasks het created.

However, for some reason, items created hours ago also trigger the flow (even after I removed them) at every first new trigger.

 

Thus 1 trigger at first, triggers all Product Backlog items with status new, within my entire organization, to also trigger the flow. Subsequently, the process repeats itself around every 5 minutes.

I think that part might be related to this part of the "peak code", which can not be altered:

},
"recurrence": {
"interval": 5,
"frequency": "Minute"
},
 
I can't however, find that part of the JSON explained in the Azure Devops document.

 

The process itself goes fine, but all other triggers but the first, should never exist as I never provided the trigger in the first place. And secondly, because there should not be a recurrence.

 

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,828)