Announcements
I want to write a condition to check if task is present under user story in ADO.
Hi @Shikhar_b,
You can use a Get work item children action for this. If the value returns [] it has no tasks as children. You can check that in a condition action.
Below is an example
The condition uses the expression below.
length(outputs('Get_work_item_children')?['body/value'])
I actually want to check if the task exists. If not create one with the title of the task
In the example that is checked, within the condition action via a length function. If the value returns 0 no task exist and the flow goes into the If Yes section of the condition. If it returns 1 or more it goes into the If No.
Currently I am just using some Compose actions to demonstrate this. However, you can replace the Compose with the name Compose - No Tasks by a Create a Work item action instead.
https://learn.microsoft.com/en-us/connectors/visualstudioteamservices/#create-a-work-item
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Mohsin Ali 289
11manish 282 Super User 2026 Season 2
Henil 119