cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frank84
Level: Powered On

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
Community Support Team
Community Support Team

Re: VSTS create task on work item creation loop

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.
Frank84
Level: Powered On

Re: VSTS create task on work item creation loop

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,126)