[rt-users] statistics query

joseph kacmarcik joe at earth.care2.com
Tue Jan 17 13:39:38 EST 2006


> Looking at the code in CallsQueueDay/index.html, I don't see any way to
> overcome this in the RTx::Statistics package, it must be something
> happening under the covers.  The excerpted code that generates this
> query looks like this:
> 
> %         my $tix = new RT::Tickets($session{'CurrentUser'});
> %         $tix->LimitQueue (VALUE => $Queue);
> %             $tix->LimitStatus(VALUE => 'deleted');
> %             $tix->LimitLastUpdated(VALUE => $dates[$d]->ISO, OPERATOR
> => ">=");
> %             if ($dates[$d+1]) {
> %                 $tix->LimitLastUpdated(VALUE => $dates[$d+1]->ISO,
> OPERATOR => "<=");
> %             }

i just found something else that's alleviated 'my' problem. in 
rt-3.4.4/lib/RT/Tickets_Overlay_SQL.pm @line 511:

# We don't want deleted tickets unless 'allow_deleted_search' is set
unless( $self->{'allow_deleted_search'} ) {
   $self->SUPER::Limit(FIELD => 'Status',
                       OPERATOR => '!=',
                       VALUE => 'deleted');
}

it's not a solution for everyone, but i've added:

$self->{'allow_deleted_search'} = 1;

which gives me the results i want. i had tried changing 
CallsQueueDay/index.html, but didn't get anywhere. i guess it's just not 
picking up this variable.(?)

i'll check out rt 3.4.5 shortly to see if there's any difference in this 
behavior.

thanks again!
joe



More information about the rt-users mailing list