[rt-users] resetting ticket numbers

Ruslan Zakirov ruslan.zakirov at gmail.com
Fri Nov 18 14:10:55 EST 2005


Very bad solution! Most probably you'll hit bugs in the future.
Tickets and transactions are not all the objects you have to delete if
you want to get rid of the tickets.
If you don't have backup then I'll suggest you to start from scratch.
If you have backup then restore it and just mark all old tickets as
deleted, or use RTx::Shredder to delete them from DB.

On 11/18/05, Walmach, Joe <joe.walmach at intel.com> wrote:
>
>
>
> In addition to the other replies on this subject I'm going to include an
> answer to my original question which I just implemented.
>
>
>
> On my Linux sever running mysql I did the following:
>
>
>
> After backing up the data base I logged into mysql and switched to my rt
> database.
>
>
>
> I then ran:
>
>
>
> TRUNCATE TABLE Tickets ;
>
>
>
> And then
>
>
>
> TRUNCATE TABLE Transactions ;
>
>
>
> I then restarted mysql
>
>
>
> This emptied the Tickets table and all historical data on those same tickets
> that resided in the Transactions table. I now am back to ticket number 1
> without the history of the previous tickets showing up. In addition I didn't
> have to disrupt my queues, users, scrips, etc.  I hope this is of value to
> someone.
>
>
>
> Joe
>
>
>
>
>
>
>
>  ________________________________
>
>
> From: rt-users-bounces at lists.bestpractical.com
> [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf
> Of Walmach, Joe
>  Sent: Friday, November 18, 2005 9:35 AM
>  To: rt-users at lists.bestpractical.com
>  Subject: [rt-users] resetting ticket numbers
>
>
>
> Is it possible to reset the tickets back to zero? We're finished with our
> testing and want to go live but it would be good to erase all the test
> tickets first. Deleting them still holds them in the data base with the
> counter leaving off with the last ticket number. Truncating the ticket table
> in mysql (Linux) brought me back to zero but all new tickets include the
> original data in the history view. For example, ticket number 1 shows what
> transpired in the original ticket #1. I hope I'm not asking a question
> that's already been answered. I've searched the archives and only found one
> incident of this question which went unanswered. Any help would be
> appreciated.
>
>
>
> 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