display the time taken to resolve an incident ,

angel kumari
Tera Contributor

hi everyone,

 

build a report that will display the time taken to resolve an incident.
The time will be calculated once the incident is assigned to a support user.
We need to get one report that will display the total time taken to resolve an incident

Thankyou

7 REPLIES 7

johnfeist
Mega Sage
Mega Sage

Hi Angel,

 

OOTB you get two fields, Business Duration and Resolve Time.  Resolve Time  is the total calendar time that it took from incident being opened to resolve it.  Business duration uses your calendar(s) to show how long it took to resolve.  The difference being that week ends, holidays, etc. are not counted.

 

Both of those contain the value in seconds.  In order to have usable data, I just created a few function fields which convert those values into hours and days.  For hours divide by 3,600 (60 seconds * 60 minutes) and for days by 86,400 (60 seconds * 60 minutes * 24 hours).

 

If you want to calculate based on when the incident was assigned to a user, you'll need to capture that date/time via a business rule and then adjust your calculations accordingly.

 

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

hi johnfeist

how we apply at the same time both condition

Hi Angel,

I'm not clear as to what you are asking.  Once the incident state changes to resolved, Business Duration and Resolve Time are automatically populated via OOTB functionality.  With the function fields in place, those values are always available. 

If you need to adjust the times to reflect the first assignment I'd suggest that you add a field, let's call it u_time_to_assign.  Then add a before update or insert business rule that is triggered by a change in assigned to where the previous value is empty and the current value is not.  The script will look like this

var createdDT = current.sys_created_on.getDisplayValue();
var timeThen = new GlideDateTime(createdDT);
var timeNow = new GlideDateTime();
var theDiff = gs.dateDiff(theIncident.sys_created_on.getDisplayValue(), timeNow.getDisplayValue);
current.setValue("u_time_to_assign", theDiff);

With this in place you can have function fields hours to resolve after assignment and days to resolve after assignment.  The difference is that the functions will be Business Hours to Resolve After Assign = (business_duration-u_time_to_assign)/3600, Business Days to Resolve After Assign = (business_duration-u_time_to_assign)/86400.  The same logic would apply to total time.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Hi johnfeist

 

I means to while i apply the condition -

1.We need to build a report that will display the time taken to resolve an incident.( we use here in  table field is incident  table ).

2.The time will be calculated once the incident is assigned to a support user.(here i used  while incident table then not apply the pt 2 condition ), so what be the next step.becz i  need both at the same report.

We need to get one report that will display the total time taken to resolve an incident