Hi all,<br><br>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:
<br><br>mysql> describe Tickets;<br>+-----------------+--------------+------+-----+--------------+----------------+<br>| Field           | Type         | Null | Key | Default      | Extra          |<br>+-----------------+--------------+------+-----+--------------+----------------+
<br>| id              | int(11)      |      | PRI | NULL         | auto_increment |<br>| EffectiveId     | int(11)      |      | MUL | 0            |                |<br>| Queue           | int(11)      |      | MUL | 0            |                |
<br>| Type            | varchar(16)  | YES  |     | NULL         |                |<br>| IssueStatement  | int(11)      |      |     | 0            |                |<br>| Resolution      | int(11)      |      |     | 0            |                |
<br>| Owner           | int(11)      |      | MUL | 0            |                |<br>| Subject         | varchar(200) | YES  |     | [no subject] |                |<br>| InitialPriority | int(11)      |      |     | 0            |                |
<br>| FinalPriority   | int(11)      |      |     | 0            |                |<br>| Priority        | int(11)      |      |     | 0            |                |<br>| TimeEstimated   | int(11)      |      |     | 0            |                |
<br>| TimeWorked      | int(11)      |      |     | 0            |                |<br>| Status          | varchar(10)  | YES  |     | NULL         |                |<br>| TimeLeft        | int(11)      |      |     | 0            |                |
<br>| Told            | datetime     | YES  |     | NULL         |                |<br>| Starts          | datetime     | YES  |     | NULL         |                |<br>| Started         | datetime     | YES  |     | NULL         |                |
<br>| Due             | datetime     | YES  |     | NULL         |                |<br>| Resolved        | datetime     | YES  |     | NULL         |                |<br>| LastUpdatedBy   | int(11)      |      |     | 0            |                |
<br>| LastUpdated     | datetime     | YES  |     | NULL         |                |<br>| Creator         | int(11)      |      |     | 0            |                |<br>| Created         | datetime     | YES  |     | NULL         |                |
<br>| Disabled        | smallint(6)  |      |     | 0            |                |<br>+-----------------+--------------+------+-----+--------------+----------------+<br><br>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.
<br><br>Anyway, just my two cents. Any comments/suggestions are appreciated!<br><br>Thanks,<br><br>Steve<br>