Was hoping someone could give me a few pointers to create a one-off script to backfill the “Started:” date on all old tickets which do not have it set. I am trying to do an analysis on response times, and to compare response times from previous years, however, it seems we only started using the “Started” field in the last couple of years, since the majority of old tickets do not have it set.
What I’d like to do is something like:
For each ticket in queue (queue) with status resolved:
: If ticket has no Started: date:
: Find the date of the first outbound correspondence transaction and set started date to this.
: If there is no outbound correspondence, set started date to the resolved or last updated date
Then I think it will be much easier to generate stats of initial response times e.g. time from Create -> Started. I have a script which generates response times, based on:
Although it works for the last 2 years, seems that we didn’t have RT configured to do anything like automatically set the Started: date on all queues before then, so this script doesn’t count any tickets that don’t have a started date.
Or maybe modify this script so that it loads the dates, rather than modify past tickets. (Although this would also help with RT’s internal reports, since it will have a date to report against.)
Any pointers much appreciated.