Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Calculate state duration

Rishabh Dev Kha
Tera Contributor

Hi,

 

I want to calculate total time for which incident is on "In Progress" state how can  I do it.I tried it with metric but it is creating seperate record if state changes from to another.

5 REPLIES 5

Bernard7
Tera Contributor

Someone (more skilled than me, but sorry I don't remember who) already answered: "use OOTB Incident State Duration". So I tested it and it works but the result (attached to this post) only gives past durations where the incident ticket was in State "On Hold" (for instance, but you can select another state in Value field of the report) and now in another State.

 

And you neither get the present duration of a ticket that is presently in the State "On Hold" from the moment the ticket passed to "On Hold" and the moment of the execution of the report, nor the cumulated durations of all moments the ticket passed to the State "On Hold".

 

I saw solutions based on scripting, but I'm looking for something more OOTB without coding.