[rt-users] statistics query

joseph kacmarcik joe at earth.care2.com
Mon Jan 16 23:58:35 EST 2006


hello's!

i'm unable to solve a statistics query problem. specifically, the 
'deleted' count is always zero, presumably because of this query:

SELECT count(main.id) FROM Tickets main   WHERE ((main.EffectiveId = 
main.id)) AND ((main.Status != 'deleted')) AND ((main.Type = 'ticket')) 
AND ( ( (main.Status = 'deleted') ) AND ( (main.Queue = '1') ) AND ( 
(main.LastUpdated <= '2006-01-17 16:00')AND(main.LastUpdated >= 
'2006-01-16 16:00') ) );

i think the problem is:

((main.Status != 'deleted')) ... AND ( ( (main.Status = 'deleted') )

when i run the query manually without the !=deleted, the count returns 
correct.

the only instance i've found in the rt3 codebase is 
./lib/RT/Tickets_Overlay.pm, but removing the 'AND ((main.Status != 
'deleted'))' doesn't change the query that's being run (viewing in mysql 
log).

i'm running rt 3.4.4 and RTx-Statistics v1.8.

has someone solved this problem and i've glossed over it in the lists?

thanks!
joe



More information about the rt-users mailing list