[rt-users] statistics query

Ruslan Zakirov ruslan.zakirov at gmail.com
Tue Jan 17 09:21:07 EST 2006


On 1/17/06, joseph kacmarcik <joe at earth.care2.com> wrote:
> 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.

Hello, Kelly, Joseph and co.
RT doesn't allow searching for deleted tickets unless you use special option
$tickets_obj->{'allow_deleted_search'} = 1
This functionality is available in 3.4.2 and greater, for earlier
versions you should patch RT.

See also usage in RTx::Shredder::Plugin::Tickets; and patch is also
shipped with shredder distribution.

>
> has someone solved this problem and i've glossed over it in the lists?
>
> thanks!
> joe
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>
> Download a free sample chapter of RT Essentials from O'Reilly Media at http://rtbook.bestpractical.com
>
> WE'RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
> San Francisco - Find out more at http://bestpractical.com/services/training.html
>


--
Best regards, Ruslan.


More information about the rt-users mailing list