[Rt-devel] Deleting a ticket, should this work?

Stephen Turner sturner at MIT.EDU
Tue Nov 21 12:35:47 EST 2006


> -----Original Message-----
> From: rt-devel-bounces at lists.bestpractical.com 
> [mailto:rt-devel-bounces at lists.bestpractical.com] On Behalf 
> Of Alex Meyer
> Sent: Tuesday, November 21, 2006 11:31 AM
> To: RT developers
> Subject: [Rt-devel] Deleting a ticket, should this work?
> 
> I got this little code snippet out of the RT Essentials book.
> 
> perl -I/opt/rt3/lib -MRT -e'
>          RT::LoadConfig(); RT::Init();
>          my $t = RT::Transaction->new($RT::SystemUser);
>          $t->Load(ticket#_goes_here);
>          print $t->Delete;
>          '
> 
> It doesn't really seem to do anything though. Maybe once upon a time  
> it worked, but not now. Does anyone have any ideas how to fix 
> it? I'd  
> really like to be able to delete our spam from the spam queue  
> COMPLETELY because our MySQL db is already over 2 gigs.
> 
> I should add that i don't get an error when running the above, it  
> says 1 objected deleted but when I check the web interface and the  
> mysql db the entry is still there.
> 
> Thanks,
> Alex

All you're doing here is marking the ticket with a 'deleted' status, thus
making it invisible in the web interface or the API. To remove tickets
completely, you should use Ruslan's RT Shredder:

http://wiki.bestpractical.com/index.cgi?Extensions 

Steve

----------------------------------------
Stephen Turner
Senior Programmer/Analyst - Client Support Services
MIT Information Services and Technology (IS&T)
  



More information about the Rt-devel mailing list