Level of Effort timer/calculator

ngriffiths
Mega Expert

I am trying to create a LOE (level of effort) timer/actual time spent calculator on stories, but I am not having any luck. I have tried the Actual duration, open/closed, time worked...fields. Basically I am trying to accomplish the following: from the time a story is created to the time it ends give me the total effort/actual time spent on it. In addition, I have different states that the story can go through - 12 states. As a result, I want to know the amount of time spent in/at the state level as well. Are both of these things possible? If so how do I go about this? I am not a developer and scripting is not my strongest area; so if this requires scripting, I would appreciate it if you can assist me with that as well :)!!

Thanks!
nbarnes

4 REPLIES 4

Uncle Rob
Kilo Patron

Time spent is notoriously difficult to measure, if you're talking about the human time worked, rather than the time the record has existed.

Assuming you mean the latter, you can track the time spent in each state by building a Metric for it.
http://wiki.servicenow.com/index.php?title=Metric_Definition_Support

You'll create a new Metric Definition pointing at the Stories table, with a Type of "Field Value Duration" measured against your state field. This will create a new Metric Instance record every time the state changes, which begins the timer for that state. I believe it will be measuring raw time on a 24x7 schedule, unless you script it otherwise.

If you're looking to capture the amout of time humans have actually performed work, you need a culture absolutely OCD about starting and stopping clocks. However, if I had that level of trust, I'd simply ask them to state the duration upon closure of the task/story/etc. That's my $0.02


Thanks for your response :)!

1. Do you happen to know if metrics are based on changes, like state changes or can metrics be based on anything?

2. In order for the metric to work, do we need to determine what the previous state was? In other words, we are also trying to get the total duration of the story from start to finish, but during the time that it is open it changes states. Is it important to know all the state change durations to calculate the total story duration?


1. When you build a metric for a field duration, you're telling it to measure the time any value has been in that field. Thus you only get results when the field changes or record closes. Make sense?

2. The metric starts working as soon as the Definition record is created. A Metric Instance is created for each change of whatever field you're measuring durations for. If you change the state 5 times, there will be five metric instance records. You could also construct a metric that would measure the length of the record, but you'd likely have to construct the definition in javascript.


That does make sense :).

I did end up creating 2 metrics. The first was the one you described to measure the duration of each state and the second was to calculate the total duration from open to close. So far it looks good and is what I was needing/wanting.

Thank you :)!!!