[rt-users] ticket numbers

Joerg Herbert joerg at die-herberts.de
Tue Feb 22 06:18:13 EST 2005


On Mon, 21 February 2005 22:45:49 -0000, Raed El - Hames wrote:
 
> ----- Original Message ----- 
> From: "Joerg Herbert" <joerg at die-herberts.de>
> To: <rt-users at lists.bestpractical.com>
> Sent: Sunday, February 20, 2005 11:22 PM
> Subject: Re: [rt-users] ticket numbers
> 
> 
> > On 20 Feb 2005 at 21:09, Chris Knipe wrote:
> >
> > > Which database's auto_increment field do I change / set again in order
> > > to get RT to use specific IDs for tickets?
> >
> > First, a simple ALTER TABLE doesn't work, because it isn't supported
> > with INNODB-Tables under mysql.
> >
> > This ist what I use:
> > ----
> > BEGIN WORK;
> > LOCK TABLES Tickets WRITE;
> > INSERT INTO Tickets (id) VALUES
> > (DATE_FORMAT(CURRENT_DATE,'%Y%m%d00'));
> > DELETE FROM Tickets WHERE id = DATE_FORMAT(CURRENT_DATE,'%Y%m%d00');
> > UNLOCK TABLES;
> > COMMIT;
> > -----
> I wont opt out for this method either, you 'll get untold problems when its
> time to upgrade , or bug fix etc ..also I am not sure how ticket updates via
> mail will work ..I would recommend that you create a seperate table with the
> Id you wish DATE-Id and Tickets.Id as fields.

Normally your don't run into any Problems. I run my snippet once a Day
via cron-script. So Ticket-Creation via Mail goes the normal way (I hope
I understand your Problems here).

But you are correct, I have to check for each major update if the
database-schema for Tickets change. But I do have to do this regardless
if I do it my way or your way.

 -- 
Bye for now,
Bis denne,
                    Joerg



More information about the rt-users mailing list