I need the epic and futures progress to be calculated like work details, based on hours

Maricela Becerra / New Data 0 Reputation points
2025-01-14T06:18:32.9766667+00:00

In Azure DevOps, the current progress of an epic is typically calculated based on the number of completed child stories. How can I calculate epic progress based on the hours worked on child stories and tasks?

Community Center | Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 35,221 Reputation points MVP Volunteer Moderator
    2025-01-14T06:50:54.3766667+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    To calculate the progress of an epic based on the hours worked on its child stories and tasks in Azure DevOps, you can follow these steps:

    Setup Your Work Items

    Ensure your epic, child stories, and tasks have the following fields properly configured:

    • Original Estimate: Total estimated hours for the task/story.
    • Remaining Work: Remaining hours to complete the task/story.
    • Completed Work: Hours already spent on the task/story.

    Use Azure DevOps Queries

    • Create a query to pull all child stories and tasks under a specific epic.
    • Include the Original Estimate, Remaining Work, and Completed Work fields in the query.

    Calculate Progress

    • Formula for Progress: Progress= (totalcompleted work/total original estimate)x100
    • Use the following aggregate calculations:
      • Total Original Estimate: Sum of the Original Estimate field for all child stories and tasks.
      • Total Completed Work: Sum of the Completed Work field for all child stories and tasks.

    Automate Progress Calculation

    Azure DevOps doesn't natively calculate progress based on hours, so you have two options for automation:

    Use Azure DevOps Analytics Views

    • Enable Analytics in your Azure DevOps project.
    • Use Power BI to connect to the Analytics Service.
    • Create a report that calculates epic progress based on the hours worked.

    Write a Custom Script Using Azure DevOps API

    • Use the Azure DevOps REST API to retrieve work item data programmatically.
    • Use the following API endpoints:
      • Get Work Item to fetch the epic and its child stories/tasks.
        • Aggregate the Original Estimate, Remaining Work, and Completed Work fields.
        • Calculate the progress percentage using the formula above.

    Update Epic with Progress

    • Use the REST API to update the epic's custom field (if created) or a predefined field with the calculated progress.
    • Use Dashboards in azure devops to display progress using widgets like "Progress by Query" or custom Power BI visuals.

    Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.