AW: Re: [otrs] Queue ID in ticket number or hook?

Hello Richard,
This sounds very interesting to me. Maybe you can post a patch for the changes you made on NewTicket.pm so I can rework you solution for me.
Thanks and kind regards
Falko Zurell
Head of Application Management
I-D Media AG
Tel.: +49-30-25947-357
----- Original Message -----
From: otrs-bounces
Sent: 18.05.2006 16:28
To: "User questions and discussions about OTRS.org"
Hi,
A customer of us does support for multiple customers of his. Every customer has his own queue with all the settings and e-mail addresses etc. He wants the ticket number or hook to contain a part of the queue name. So when someone calls and says I have ticket nr XYZ-0123456, he knows it's a XYZ customer. Is this possible? Maybe I could write a new ticket number generator, but I don't know if the queue is known at the moment of ticket number generation. And what to do when the ticket changes queue? My feeling is that it's not a smart thing to try, since a ticket is not locked to a certain queue and changing ticket numbers when changing queues seems really awkward to me.
Any thoughts on this?
Regards, Richard
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 Support oder Consulting für Ihr OTRS System? => http://www.otrs.de/

Sure. Put NewTicket.pm in Kernel/System/Postmaster/ (changed line 158, added the "QueueID => $QueueID" parameter; Put AutoIncrementQueueComment.pm in Kernel/Ticket/Number. This takes the comment field of the queue, removes non A-Z chars and takes the first 5 chars (uppercase) and puts that in the ticket nr (ABCDE-123456). I used comment for this moment, since I don't know another column I could use and I don't feel like changing the DB scheme for adding another field. But you can take any field you like of course. In Config.pm add: $Self->{'Ticket::NumberGenerator'} = 'Kernel::System::Ticket::Number::AutoIncrementQueueComment'; And it should work. Since I have very little Perl experience, I might have done some things weird, or even have bugs in the code, please tell me :) Regards, Richard falko.zurell@idmedia.com wrote:
Hello Richard,
This sounds very interesting to me. Maybe you can post a patch for the changes you made on NewTicket.pm so I can rework you solution for me.
Thanks and kind regards
Falko Zurell Head of Application Management I-D Media AG Tel.: +49-30-25947-357

Hmm, Just saw it doesn't work when creating a new ticket in OTRS, only with incoming mails. Let's see if I can fix that. Regards, Richard

Found it. In Kernel/Ticket.pm change # create ticket number if not given if (!$Param{TN}) { $Param{TN} = $Self->CreateTicketNr( ); } to # create ticket number if not given if (!$Param{TN}) { $Param{TN} = $Self->CreateTicketNr( QueueID => $Param{QueueID} ); } Regards, Richard Richard Hinkamp - BeSite wrote:
Hmm, Just saw it doesn't work when creating a new ticket in OTRS, only with incoming mails. Let's see if I can fix that.
participants (2)
-
falko.zurell@idmedia.com
-
Richard Hinkamp - BeSite