It's all about the answers!

Ask a question

JRS - Count number of states work-items did on average


Gil Br (1014) | asked Nov 24 '19, 8:11 a.m.

 Hi,


I like to generate a report of the number of states on average workitems of a specific type made over time.
For example we have 14 states in a flow of a bug, from open to close we have few paths, I like to get the number of how many states on average are used to get from open to close (a state can be visited more than once)

Any ideas?

Gil

Accepted answer


permanent link
Jackie Albert (1.6k14947) | answered Nov 26 '19, 10:16 a.m.

 If you're using a data warehouse based report, you can get creative with the 'Work Item Status History' to do something like this.


Use traceability to link from 'Work Item Status History' to its related 'Work Item'
Then in the Format Results area, you can use a custom expression to count the number of 'Work Item Status History' entries for each work item.

From here you should be able to play around to get at least close to what you want.

Gil Br selected this answer as the correct answer

Comments
Gil Br commented Nov 26 '19, 10:45 a.m.

It's genius! Thanks a lot !!!


One tiny issue to notice that the number is greater by one from the number of statuses, so I simply subtracted 1 off the formula:
Count($Work Item Status History:Work Item State History ID$) -1

Many thanks again!


Jackie Albert commented Nov 26 '19, 10:46 a.m.

 Yes - I noticed that too. It counts the (does not exist) -> Open as a state transition, so glad you caught that :)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.