0

We are trying to plot a burndown chart in our application by fetching data from Azure Devops. We are using OData API and WorkItemSnapshot to pull the data for each day in the sprint. Here is the OData Query :


    https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/WorkItemSnapshot? 
            $apply=filter(
                Teams/any(d:d/TeamName eq 'TeamName')
                and Iteration/IterationName eq 'IterationName'
                and DateValue ge Iteration/StartDate
                and DateValue le Iteration/EndDate          
            )
                /groupby(
                (DateValue,Area/AreaPath,Iteration/IterationPath,AreaSK,Iteration/StartDate,Iteration/EndDate),
                aggregate(RemainingWork with sum as TotalRemainingWork,CompletedWork with sum as SumOfCompletedWork)
            )

This returns the remaining and the completed work for each day of the sprint.However I want to remove the non-working days eg: Saturday and Sunday and other holidays from the returned data. Is there any way to query Azure Devops to return only data for the Working Days in a sprint.

Since this is achievable in Azure Devops Burndown chart.I think there should be some flag or API to get this data.

HHS
  • 83
  • 1
  • 7
  • According to the [documentation](https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-boards-sprintburndown?view=azure-devops&tabs=odata), there seems to be no such filter. – Hugh Lin Apr 24 '20 at 10:05
  • Yeah @HughLin-MSFT in the documentation there is no such flag to filter the dates. However we do have this option in Azure Devops and there ShowNonWorkigDays Flag is being used to filter the dates ```BurndownReport/ShowNonWorkingDays: true``` So I was wondering if that can be done using Odata APIs as well – HHS Apr 24 '20 at 10:30
  • Hi @HughLin-MSFT, on top of this, is there any example to plot the total scope? I have try different OData query but I got inaccurate result. Please share if you happen to have one. – rick May 21 '20 at 10:15
  • Hi @rick , we calculated the total scope using the formula (Total remaing Work on startDate of Sprint - Total remaining work on currentDate) when the bugsBehaviour is asRequirements and (Total remaing Work on startDate of Sprint - Total remaining work on currentDate - Remaining work of closed tasks) when bugsBehaviour is asTasks. We have not encountered any inaccurate result yet using this formula. You can also give it a try. – HHS May 21 '20 at 19:32
  • @Hari in my case, I am only interested in story points. However, isn't the total scope is total work you have? why are you subtracting remaining work on currentDate? – rick May 22 '20 at 03:00
  • @Rick , I thought you were referring to the total scope increase on the top of the burndown graph. Can you share the queries you have tried. Or some sample for refernce where you are getting inaccurate result. – HHS May 22 '20 at 05:19
  • i meant the total scope, the yellow line you can see in the burndown chart, NOT total scope increase. Basically i using the same query of my sprint burndown query and removing the statecategory ne 'Completed' p/s: i have also created a [question](https://stackoverflow.com/questions/61948222/azure-devops-odata-sprint-burndown-chart-not-showing-0-story-point) if you are interested in my situation. – rick May 22 '20 at 05:34

0 Answers0