'Azure Devops Dashboards - How to chart the trend of query results over time based on work item history?
I want to be able to generate a stacked bar chart based on the results of a query, for example the number of open bugs and open features. I would like to see the resulting number of open bugs vs features from that query over a time period, for example the last 30 days. Specifically the number of bugs vs features that were open on that particular day, regardless of their current status. Is there a way to do this using an existing out of the box widget? I believe it should be possible to figure out this information using the history. Alternatively, is it possible to simply store the totals from the query somewhere in devops and then chart it? Or would I need to write a script to export the query results via the api and then use something like the power bi widget to chart it?
Solution 1:[1]
Sure, you can set up a chart of the query about the bugs and features opened in the last 30 days.
To meet this demand, you can do like as the steps below:
Set up a query with the following filter clauses. Save this query to the Shared Queries folder.
Work Item Type
In
Bug,Feature
State
=
[Any]
Created Date
>=
@StartOfDay('-30d')
On the Charts tab of the new query, create a new chart for the query like as below.
After saving the chart, add this chart to a specified dashboard in the project.
After above steps, navigate to the specified dashboard in the project, you can see the chart on the dashboard.
[UPDATE]
According to your latest reply, you want to get the Bug and Feature that were open state in the last 30 days. For these work items, we can think they satisfy one of the following conditions:
- The work items were closed in the last 30 days, no matter what date they were created.
- The work items are still open state currently. They do not have the closed date yet.
So, set up the query like as below should be able to match these work items.
Work Item Type
In
Bug,Feature
And
State
=
[Any]
And
Closed Date
>=
@StartOfDay('-30d')
Or
Closed Date
=
Group the last two clauses.
Then create the chart for the query.
Solution 2:[2]
Maybe the stacked chart would go some way to answering your problem.
That produces charts with date as the x axis which, I think, is what you're looking for.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Malcolm Burtt |