[rt-users] RT Ticket Counts and why they differ

Shawn Scantland sscantland at gmail.com
Tue Aug 28 15:31:58 EDT 2007

Hi Jesse,

>RT stores ALL dates as UTC in the database. My first guess would be
>ACLs (are you root? Are there deleted tickets?)
>Have you compared the missing tickets to see if there are commonalities?

Thanks for getting back to me so soon.  I have connected as both root and
myself when querying this queue and the results were the same for the
queries.  Now I have modified my mysql query to:

select count(*) from Tickets where Created >= '2007-08-23 04:00' and Created
<= '2007-08-24 03:59:59' and Queue = 1 and Status != 'deleted' and !(Status
= 'resolved' and Resolved = '1970-01-01 00:00:00');

where a queue of 1 is the support queue.  This query gives me the same list
of tickets as the RT Ticket Query results.  The results also match the calls
from the RT CLI.

I have noticed that there are several tickets that have a status of resolved
but not have a Resolved datetime other than the default.  Oddly doing either
a status update via "The Basics" options or selecting the Resolve link at
the top of the ticket page both show me a datetime for Resolved in the
database (and UI).  So it is interesting how we can have tickets with that
situation.  The version of RT at work and my local copy are both 3.4.4.  The
data in question is recent but I have not been able to replicate the

Now I can get the RT Ticket Query and mysql to agree on the results but
RTx::Statistics is returning different values.  Does RTx::Statistics gather
the data differently?  In specific looking at the 'Time to Resolve' I get
values that are nothing like what the 3 other options above will show me for
the count of Created tickets.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20070828/81a566c8/attachment.htm>

More information about the rt-users mailing list