I would like to gather the average time spent to close tasks for the last month. I can't find such metric in my interface. can someone help me?

patricetieugni
Kilo Explorer

I would like to gather the average time spent to close tasks for the last month. I can't find such metric in my interface. can someone help me?

I can obtain the same metric for incidents but I don't know where the one for tasks is located.

6 REPLIES 6

Kalaiarasan Pus
Giga Sage

tasks? are you referring catalog tasks?


yes


When you say "time spent to close" what exactly do you refer to?   Created to Closed time or sum of Time Worked entries on the TASK?


There is an out-of-the-box business rule that does something like this:


BR: Close Ticket


Table: [sc_task]


Condition: current.state.changes() && (current.state == 3 || current.state ==4)



current.active = false;


current.work_end = nowDateTime();


current.business_duration = gs.calDateDiff(current.work_start.getDisplayValue(),current.work_end.getDisplayValue(),false);



But it's funny, I cannot seem to find the work_start field on that table.


Technically you should be able to use this same script to run your own business rule with the fields you want.


the fields work_start and work_end are inherited from task table .....