So just a quick question so that I can put my mind to rest. Why is the ticket count for created tickets on any one particular day different when you compare the data in the database to what's coming out of the API?<br>
<br>For example:<br>On a particular day in one of our queues the rt CLI command<br><br>rt ls -i "Queue = 'support' and Created >= '2007-08-23 00:00:00' and Created <= '2007-08-23 23:59:59'" | wc -l
<br><br>will return 12 as the count of tickets. Now if I were to take into account that the database stores datetime in localtime but the API wants to use UTC for the days<br><br>rt ls -i "Queue = 'support' and Created >= '2007-08-22 17:00:00' and Created <= '2007-08-23 16:59:59'" | wc -l (assuming I am doing the math right as the database is using PDT (GMT -7) )
<br><br>will return 12 as well (coincidentally).<br><br>Now if I query the database with a similar query<br><br>select count(*) from Tickets where Created >= '2007-08-23 00:00:00' and Created <= '2007-08-23 23:59:59' and Queue =1; (where support == 1 for Queue)
<br><br>I get 19 records. If I modify the record for UTC <br><br>select count(*) from Tickets where Created >= '2007-08-22 17:00:00' and Created <= '2007-08-23 16:59:59' and Queue =1;<br><br>I get 25 records.
<br><br>I am assuming some filtering is going on here, but I wonder why that is. If I want a count of tickets created on one day (UTC conversions aside) shouldn't the database record counts and the RT API results match? Is it only considering tickets that are active? Is it removing resolved tickets? Is there a table join going on that is restricting the results?
<br><br>This may be very basic but I haven't been able to find it anywhere in the RT wiki or lists.<br><br>Thanks,<br>Shawn Scantland<br><br>