
Note: I wrote all this before looking at the code. The code seems like it
should handle this properly, but in the mean time, this is what I wrote, in
case it makes sense or something. No guarantees. It doesn't seem to have
been necessary.
===Begin===
Is your ticket length "5"? You may want to increase that in sysconfig.
Ticket::NumberGenerator::MinCounterSize:
If "AutoIncrement" was selected as TicketNumberGenerator you can set the
minimal ticket counter size. Default is 5, this means the counter starts
from 10000.
It also means that 5 digits is all that's significant in your particular
numbering scheme.
the "1" is a "carry" and ignored, which is why you're generating duplicates.
Changing n=5 to 6, 7, 8, 10, won't help, on its own, though, because you
have established tickets with numbers and the system may be treating the
first 2 numbers (20?) as site ID. Whatever number you choose will be the
limit of tickets (10^(n+1)) until this happens again.
I believe you'll also need to adjust all your existing tickets to 20*000*#####
(number of zeros to insert is n-5, except for the tickets that already have
20*1*#####, -> 20*00*1#####, or n-6).
Something like
UPDATE ticket SET tn=tn - 2000000 + 20*0000000 *WHERE tn < 2100000;
UPDATE ticket SET tn=tn - 20000000 + 20*0000000* WHERE tn < 21000000;
This removes the leading "20" from the entry, and adds the appropriate
number of zeros after it.
The number of *bold *zeros (or zeros following the second "20") should be
"n".
Your results may vary. Backup your database before doing such things as mass
updates. See if what I said makes sense before doing it, and ask a question.
:) I could be wrong, but based upon what you've said, this might be what
happened.
===END===
As I mentioned above, the code seems to handle this, because it's thinks of
"minimum" up to minimum+5 digits.
I haven't spent a lot of time looking at
Kernel/System/Ticket/Number/AutoIncrement.pm but I was hoping someone else
might have spoken before I posted this. Please backup and test before making
this live.
I hope it helps. Please ask a question if you don't understand.
--
Gerald Young
On Fri, Nov 26, 2010 at 4:37 AM, Sune T. Tougaard
Hi List,
Last night, our system (2.4.7) running “AutoIncrement” on the ticket number sequence generation, crossed over from 20299999 to 20300000 (or so it seems).
But apparently something went wrong, and now it has gone back to 2000001 after having had a few issues with determining which number to use. The log looks like this:
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (2000001) exists! Creating a new one.
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (2000001) exists! Creating a new one.
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (2000001) exists! Creating a new one.
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (2000001) exists! Creating a new one.
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (20*1*00013) exists! Creating a new one.
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (20*1*00015) exists! Creating a new one.
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (20*1*00013) exists! Creating a new one.
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (20*1*00013) exists! Creating a new one.
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (2000003) exists! Creating a new one.
[Thu Nov 25 23:54:06 2010][Notice][Kernel::System::Ticket::Number::AutoIncrement::TicketCreateNumber] Tn (20*3*00017) exists! Creating a new one.
Please note the ticketnumbers, some are 5 and some are 6, some have a 1, some have a 3.
Now it seems to have settled for only 5 beginning from 1, going upwards.
TicketCounter.log seems to agree with this.
Any ideas what might have gone wrong and how I get out of it again?
I could just let it run, spamming the log with the above messages, until it finds free numbers again, but I’m not sure what the consequenses will be.
Increase the number in ticketcounter.log, perhaps?
Switch to “Date” or something?!
Any input will be much appreciated.
Thanks
--
/Sune T.
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs