[rt-users] Custom numbering scheme?

Ryan Whalen rwhalen at advanceweb.com
Fri May 3 08:30:23 EDT 2013


mysql>
ALTER TABLE Tickets AUTO_INCREMENT=2013000;
INSERT INTO Tickets(Disabled) VALUES(1);
DELETE FROM Tickets WHERE id = '2013000'

Tickets will then start at 2013000 and increment 2013001, 2013002, etc.
 How many 0s you append to 2013 should reflect the expected ticket load for
that year. If you get 2000 tickets in 2013 then it will be 2015000 by the
end of the year.

N.B.,Tickets.id is int(11), so you won't be able to do more than
20130000000, but a million tickets a year would be impressive.

You'll have to execute the above commands again in 2014 and every year
after to maintain this. Maybe a cron job will take care of it.



On Thu, May 2, 2013 at 1:52 PM, Cena, Stephen (ext. 300) <SJC at qvii.com>wrote:

> **
> I'm going to be deploying another RT installation for our service
> department here. One thing they would like is to have the ticket numbers
> customized. What they'd like is for the current year to be prepended to
> each ticket number, and then reset. So for 2013 it's be, say, 20131 - 2013n
> and then next year have 20141 to 2014n and so on.
>
> Is something like this possible, or should I just tell them it's too
> difficult?
>
> Stephen Cena
> QVII
> MIS/IT Dept
> 850 Hudson Ave.
> Rochester, NY. 14620
> 585-544-0450 x300
> sjc at qvii.com
> "Thank you for helping us help you help us all."
> --For email related issues, please contact postmaster at qvii.com
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130503/af6a0b6a/attachment.htm>


More information about the rt-users mailing list