I’m trying to Calculate Ticket Closure time on resolution and for this i am thinking of using a scrip to be triggered on resolution and which would access the time created and resolved subtract them and update a custom field.
Anyone of you have done this before?
How can i access the times? and also is it possible to make any airthmatic operations on the time?
Response would be sincerly appreciated since this needs to implemented ASAP.
You can definitely do this with a scrip and set a custom field value to store it, It may be worth searching around here for a similar question I feel its been asked before.
How can i access the times? and also is it possible to make any airthmatic operations on the time?
RT has a great date module that can calculate the differences between two date objects. So you could set one to “now”: $resolvedDate->SetToNow and then get the created date object from the ticket $self->TicketObj->CreatedObj.
Last you can use the Diff date method to get the time between the two date objects and set some custom field to that diff value.