cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LABORSAL
Advocate II
Advocate II

Azure DevOps New item with dynamic iteration

Hello,

 

I'm trying to create a flow which will create a new item in Azure DevOps whenever a new message is posted in teams.

 

I already managed to create the item and assign it to a parent, however I am unable to assign it to the current iteration.

 

When I try to use the values from "List Iterations" it automatically converts to a "Apply to Each" which wouldn't work (I only want to apply it to the current iteration), is there a way to reference the current iteration in Azure DevOps?

 

This is the current flow I have:

Current flowCurrent flow

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-zhos-msft
Solution Sage
Solution Sage

Hi @LABORSAL ,

I am afraid that there is no way to achieve your needs in Microsoft Flow currently.

There is no action about get a specific iteration in Azure DevOps.

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

Best Regards,

Community Support Team _ Zhongys

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-zhos-msft
Solution Sage
Solution Sage

Hi @LABORSAL ,

I am afraid that there is no way to achieve your needs in Microsoft Flow currently.

There is no action about get a specific iteration in Azure DevOps.

If you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

shvyas
Microsoft
Microsoft

Hello,

Was this feature added since I am trying to do the same thing. I need to extract the current iteration for the work item I am creating based on the responses I get from a form.

 

Thanks.

MagicBulletDave
Regular Visitor

After lots of messing around I have managed to solve this and create work items and add them to the current iteration:

 

Screenshot 2020-06-03 at 16.07.27.png

 

Use the List Iterations as normal, then add a Filter Array action.  In the From choose Value from the previous step.

 

Use the Advanced Editing option and add the expression:

 

@And(greaterOrEquals(item()?['Attributes/FinishDate'],triggerBody()['key-button-date']),lessOrEquals(item()?['Attributes/StartDate'], triggerBody()['key-button-date']))

 

Like this:

 

Screenshot 2020-06-03 at 16.12.39.png

 

Then add a Compose action and in the input at the following expression (the 'Current_Iteration' is the name I gave the filter array action and you will need to change this if you have called it something different):

 

@first(body('Current_Iteration'))?['Path']
 
You can now use the dynamic content field Outputs in the Iteration Path of your work team create action:
 
Screenshot 2020-06-03 at 16.17.18.png

@LABORSAL@shvyas@v-zhos-msft 

 

See my recent post, managed to solve this.  Hope this helps, Dave

MagicBulletDave
Regular Visitor

Hi, managed to solve this after a lot of messing around.  See my post below for the steps.  Hope this helps, Dave

eggnes89
Regular Visitor

@MagicBulletDave 

I can't manage to get this to work with the solution you gave.
I get this error:

eggnes89_0-1605791325042.png

Is there somebody that could help me with this? is there another way to get the new azure devops item in the current iteration?

 

Thanks!!

Sbharani
Microsoft
Microsoft

@eggnes89 Use the following expression. It worked for me. 

 

@And(greaterOrEquals(item()?['Attributes/FinishDate'], utcNow('yyyy-MM-dd')),lessOrEquals(item()?['Attributes/StartDate'], utcNow('yyyy-MM-dd')))

 

 

ricardo_serrao
New Member

That worked for me, thanks.
However I was trying to set the iteration based on the start date of an outlook event. Which would mean changing the query somehow...Can you shed some light on this?

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 (2,184)