[rt-users] Question about ticket gone CRAZY

Joby Walker joby at u.washington.edu
Fri Nov 3 19:44:54 EST 2006


This has happened a couple times for us.  The following works well to 
delete an entire range of tickets.  Note this is for PgSQL, other DB may 
require different syntax.

delete from attachments where transactionid IN (
     select tx.id from transactions tx, tickets t
          where tx.objecttype='RT::Ticket' AND tx.objectid=t.id AND
                t.effectiveid= <insert ticket number> AND
                tx.id >= <insert first transaction to delete> AND
                tx.id <= <insert last transaction to delete>
);

delete from transactions where id IN ( <same subselect as above> );

You the first time you run them you might want to replace the delete 
with select *, just to make sure you are deleting what you want to delete.

Joby Walker
C&C SSG, University of Washington


Jay Vlavianos wrote:
> 
> 
> I have a ticket that received 2500 replies on accident that I can no 
> longer manage.  Apparently one of my admins had his personal email 
> forwarding to his home email which went offline.  I am not sure how it 
> got into a loop, but it created the monster trail of history that makes 
> it unloadable.   Is there any way to remove this history and gracefully 
> close the ticket?  Ideally I could keep the ticket itself, instead of 
> deleting it from the database, but if that is what it takes J
> 
> Any help is greatly appreciated!
> 
> -Jay
> 
> 
> Jay Vlavianos
> 
> Production Operations
> 
> 415.277.3515
> 
> jay at ecastinc.com <mailto:jay at ecastinc.com>
> 
> I've just decided to switch our Friday schedule to Monday, which means 
> that the test we take each Friday, on what we learned during the week, 
> will now take place on Monday, before we've learned it. But, since today 
> is Tuesday, it doesn't matter in the slightest.Mr. Turkentine   
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com



More information about the rt-users mailing list