cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eggnes89
Regular Visitor

new item in current iteration in azure devops with MS flows

Hi!

 

I have made a (standard) flow to create a new work item (bug) in azure devops when a response is submitted for a MS form. 
Now the new work item is just put on the backlog, but i want it to be created directly in the current iteration. 
I have found this post: Solved: Azure DevOps New item with dynamic iteration - Power Platform Community (microsoft.com) but that solution doesn't seem to work when i build it exactly the same way..

I now have this:

Schermafbeelding 2020-11-24 154152.pngSchermafbeelding 2020-11-24 154318.png

 

But it comes back with this error and i can't seem to figure out why it isn't working.. i am not a coder or developer, so that might be the problem 😉 

Schermafbeelding 2020-11-24 154431.png

 

Can anybody help me with this? If you have a different solution for creating the work item in a specific iteration then i would love to hear that as well!

 

Thanks! 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User II
Super User II

Hi @eggnes89,

 

You could the Send an HTTP request to Azure DevOps for this, together with the following Azure DevOps Services REST API 6.0 list iteration call, https://docs.microsoft.com/en-us/rest/api/azure/devops/work/iterations/list?view=azure-devops-rest-6...

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber/_apis/work/teamsettings/iterations?$timeframe=current&api-version=6.0

 

getcurrentiteration.png

 

In the Create a Work item action you can use the following expression in the Iteration Path:

outputs('Send_an_HTTP_request_to_Azure_DevOps_-_Get_Current_Iteration')?['body']['value'][0]['path']

 

expression_currentiterationpath.png

 

Hope this helps a bit.

View solution in original post

5 REPLIES 5
Expiscornovus
Super User II
Super User II

Hi @eggnes89,

 

You could the Send an HTTP request to Azure DevOps for this, together with the following Azure DevOps Services REST API 6.0 list iteration call, https://docs.microsoft.com/en-us/rest/api/azure/devops/work/iterations/list?view=azure-devops-rest-6...

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber/_apis/work/teamsettings/iterations?$timeframe=current&api-version=6.0

 

getcurrentiteration.png

 

In the Create a Work item action you can use the following expression in the Iteration Path:

outputs('Send_an_HTTP_request_to_Azure_DevOps_-_Get_Current_Iteration')?['body']['value'][0]['path']

 

expression_currentiterationpath.png

 

Hope this helps a bit.

View solution in original post

Hi @Expiscornovus,

 

Thanks for your suggestion, i have tried this, but apparently i don't have the rights to do this. I think it might be because it is a premium feature and i am not sure if we have premium in our organization. But i am definitely not authorized to do this 😞 
unauthorized.png

Could i do this without the premium rights as well? or is the problem not even in the fact that this is a premium feature? maybe i haven't build it right, this is what i made:
get current iteration.png

 

Thanks again for your help!! 🙂

Expiscornovus
Super User II
Super User II

Hi @eggnes89,

 

I spotted an error in your configuration. The Relative URI field of the HTTP request action should be a value without the https://dev.azure.com/organizationname. So can you change that to: 

FabrikamTravel/_apis/work/teamsettings/iterations?$timeframe=current&api-version=6.0

 

Expiscornovus
Super User II
Super User II

Oh and in the second action I can see you have added the expression as just a regular string value instead of an expression. Press the fx icon first before you paste in the expression:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

iterationpathexpression.png

 

@Expiscornovus,

 

Thanks a lot! it works!! 🎉

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (50,401)