[rt-users] Initial ticket response calculation

Steve Finkelstein stevefink at gmail.com
Mon Jan 8 15:55:30 EST 2007


Hi all,

I'm working on simple script to determine the average ticket response time
per queue in an RT ticket.  I was just curious if anyone has already done
this task and has any suggestions. The best way I see making this possible
is by using the Tickets table in the database:

mysql> describe Tickets;
+-----------------+--------------+------+-----+--------------+----------------+
| Field           | Type         | Null | Key | Default      |
Extra          |
+-----------------+--------------+------+-----+--------------+----------------+
| id              | int(11)      |      | PRI | NULL         |
auto_increment |
| EffectiveId     | int(11)      |      | MUL | 0
|                |
| Queue           | int(11)      |      | MUL | 0
|                |
| Type            | varchar(16)  | YES  |     | NULL
|                |
| IssueStatement  | int(11)      |      |     | 0
|                |
| Resolution      | int(11)      |      |     | 0
|                |
| Owner           | int(11)      |      | MUL | 0
|                |
| Subject         | varchar(200) | YES  |     | [no subject]
|                |
| InitialPriority | int(11)      |      |     | 0
|                |
| FinalPriority   | int(11)      |      |     | 0
|                |
| Priority        | int(11)      |      |     | 0
|                |
| TimeEstimated   | int(11)      |      |     | 0
|                |
| TimeWorked      | int(11)      |      |     | 0
|                |
| Status          | varchar(10)  | YES  |     | NULL
|                |
| TimeLeft        | int(11)      |      |     | 0
|                |
| Told            | datetime     | YES  |     | NULL
|                |
| Starts          | datetime     | YES  |     | NULL
|                |
| Started         | datetime     | YES  |     | NULL
|                |
| Due             | datetime     | YES  |     | NULL
|                |
| Resolved        | datetime     | YES  |     | NULL
|                |
| LastUpdatedBy   | int(11)      |      |     | 0
|                |
| LastUpdated     | datetime     | YES  |     | NULL
|                |
| Creator         | int(11)      |      |     | 0
|                |
| Created         | datetime     | YES  |     | NULL
|                |
| Disabled        | smallint(6)  |      |     | 0
|                |
+-----------------+--------------+------+-----+--------------+----------------+

One can essentially use the Created field and the LastUpdated and run a
script from cron which will subtract the two. Then I'd need a way to hash
the ticket IDs I've already populated because the problem here is,
LastUpdated can arbitrarily be modified anytime a ticket gets modified. I'd
probably create a seperate database/table schema for that, but that's
another subject.

Anyway, just my two cents. Any comments/suggestions are appreciated!

Thanks,

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20070108/5c92b864/attachment.htm>


More information about the rt-users mailing list