[rt-users] can't search on status=deleted

Mathew jokermjs19 at comcast.net
Mon Aug 14 18:21:08 EDT 2006


Mike Friedman wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Wed, 2 Aug 2006 at 03:32 (-0400), Mathew Snyder wrote:
> 
>> RT won't do searches on deleted tickets.  in order to see them you 
>> either have to do queries directly in the database or as you've 
>> already discovered, vi Shredder.
> 
> Although, you can search on deleted tickets from a perl script, e.g.:
> 
>    my $TicketList = new RT::Tickets($RT::SystemUser):
>    my $ticket1 = "$ARGV[0]";
>    my $ticket2 = "$ARGV[1]";
> 
>    $TicketList->{'allow_deleted_search'} = 1;
>    $TicketList->LimitStatus(VALUE => "deleted");
> 
>    # Search for deleted tickets within the specified ticket range:
>    $TicketList->LimitId(OPERATOR => '>=', VALUE => $ticket1);
>    $TicketList->LimitId(OPERATOR => '<=', VALUE => $ticket2);
> 
> Mike
> 
> _________________________________________________________________________
> Mike Friedman                        IST/System and Network Security
> mikef at berkeley.edu                   2484 Shattuck Avenue
> 1-510-642-1410                       University of California at Berkeley
> http://socrates.berkeley.edu/~mikef  http://security.berkeley.edu
> _________________________________________________________________________
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 6.5.8
> 
> iQA/AwUBRODYAK0bf1iNr4mCEQLJdwCfSCz9H6obVXAuHI3P2T1ptqiGmPsAnjTM
> FsDQQ33wIekF9V0KlXFiMKmv
> =Fwhk
> -----END PGP SIGNATURE-----
> 
> 

Or you could install RTx::Shredder which provides the option within RT. 
  Of course, it is a limited function considering the idea is to 
ultimately remove the deleted tickets from the database.  But it will 
give you a list of all of them.

-- 
Mathew Snyder




More information about the rt-users mailing list