- My View
I setup a metric to get the assigned to duration on the sc_task table. It does not calculate the duration for the person who closes the task as the assigned to did not change. How can I get the metric to also calculate the duration of the person who closes the ticket as well?
How will the system know, from when the Closed by person worked on the task, if he wasn't assigned.
System can't capture that. Only the duration for which user was assigned to can be calculated.
Please Hit like, Helpful or Correct depending on the impact of the response
It was assigned the metric just does not calculate because the assigned to does not change when it is closed.
Well that seems like a terrible ITIL violation to have a ticket be able to close without an assigned_to. You should have it at least put the current user (at time of closing) or have a data policy that won't allow you to close it without an Assigned To
Take a look at the out of the box Metric named Open. You probably need to copy that one to the sc_task table.
It's a special Metric that closes out open Metrics and sets the duration.
That does not seem to do anything except set the metric to complete is true so I still have 2 metrics listed the one where is what assigned to someone else and then where the second person closes it and no duration is calculated.
If you have a SC_task with one assigned to, it's captured in the Metric. If that person closes the task, nothing new is captured and the Metric doesn't show duration.
If you copy the Open metric and put on sc_task table, it will find open Metrics and set the duration. I just tried it, so I'm thinking this is what you're looking for.
Did you make any modification to the script? The screenshot I have in replay to Alan's response below is that the open script added. All it did was set the calculation compute to true on the first assigned to but did nothing for the one that was assigned to the person who closed it.
No, except for the table which changed from Incident to Sc_task.
Set the Field to Active and try.
Are you referring to somewhere in the script?
No sorry. The Field under Table is set to Assigned to. Change it to Active.
But then would that only work for the total duration? I'm trying to get it for the duration it was assigned to for each person as well as the person who closed it. It some non-it groups it move between multiple techs before it is closed and the report they want is to get the duration each tech had it. The problem I am having is that the duration for the person who closes it does not get calculated because the assigned to does not change again.
You need 2 Metrics. One field duration on Assigned To field, and one like the previous screen shots on Active field. The latter will close out open Metrics when ticket is closed. The first will calculate duration. All Metrics will be in one Metric for ease of reporting.
I got it now. Do you know who I would get this to work update already closed out tasks that I did not have the open script on active running for?
I've seen others post similar question using background script to update them. Might be worth a search to find similar posts.
The duration from when they were assigned the ticket to when it was closed, or just from open to close? From open to close you can use the field business_duration
We have a metric setup because we want to see when each person had it and how long the had it. We setup an assigned to duration but it only calculates the duration when the assigned to changes. We want it to calculate it for the last person who had it as well. Since the assigned to does not change when the person closes it there is a record but the duration is blank.