AlphaNumeric Ticket number

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

Forum rules
Dont create your support topics here! No new topics with questions allowed!
Post Reply
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

AlphaNumeric Ticket number

Post by crythias »

I modified Kernel/System/Ticket/Number/Random.pm to RandomString.pm to provide alphanumeric Ticket "number"s.

I believe simply placing RandomString.pm in Kernel/System/Ticket/Number/ should be adequate to have the choice in the drop down list of SysConfig.

My disclaimers:
  • Use at your own risk
  • If you use this file, please provide me feedback if it works or doesn't.
  • This file is to be licensed and all copyrights are to be assigned for OTRS for any reason whatsoever. It is also available to anyone who wants it under the same license as OTRS is provided.
  • I am just a volunteer. I don't have any business or employment ties to OTRS.org, OTRS.com, etc. Please don't blame them for this file, unless it becomes core. :)
  • Because and while this is a separate file from the core distribution, its existence will not be overwritten with core updates, and its functionality may break if eventually it substantially differs from the workings of Random.pm
You do not have the required permissions to view the files attached to this post.
Last edited by crythias on 05 Jul 2010, 17:03, edited 1 time in total.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
thw-1098
Znuny newbie
Posts: 1
Joined: 30 Mar 2011, 14:30
Znuny Version: 3.0.5

Re: AlphaNumeric Ticket number

Post by thw-1098 »

Hi,

I really appreciate your work. Keepo on going. :)

I tried the RandomString.pm and have one issue:

Generation of Ticket-"numbers" works fine e.g. 102BX5R, but Follow-Ups will not be recognized. The system always creates a new ticket with a new number. :(

Can you confirm this issue and do you have any suggestions to solve this.

Greetings,

Thomas
OTRS 3.0.6 with MySQL on seperate Server, Customers from Active Directory 2k8 R2, Agents locally
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: AlphaNumeric Ticket number

Post by crythias »

... at first I thought this was SystemID related. I believe it's probably a case sensitivity issue, which probably means that removing the "'A'..'Z'," from

Code: Select all

my @chars = ('a'..'z','A'..'Z','0'..'9','_');
might be adequate for *new* tickets. Unfortunately, there is no way to handle this for old tickets.

I haven't fully tested it, but what I'm proposing won't kill anything, even if it doesn't fix the issue.

Code: Select all

my @chars = ('a'..'z','0'..'9','_');
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: AlphaNumeric Ticket number

Post by ferrosti »

Good job!

While working on our next OTRS system I was thinking about a mix of increasing number and a checksum in alpha. For our agents it is more easy to work with increasing numbers. But some idiot could guess numbers, write a mail with an old ticket number and receive customer info on some other customer when he gets a reply (OTRS needs to be configured some certain way; the reply needs to go to the 'new' customer, not the original one).
To circumvent this I thought of some 128byte 'salt' in the config. Then I´d add the TN,TID and 'salt' to one string, do some SHA or MD5 over it and append the first 2 or 3 chars of this checksum to the right of the 'normal' TN.

I´d appreciate any constructive comments.
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
mortiz
Znuny newbie
Posts: 1
Joined: 25 Oct 2011, 22:44
Znuny Version: 3.0.11
Real Name: Miguel
Company: Fccus Technologies

Re: AlphaNumeric Ticket number

Post by mortiz »

not sure if this has been addressed, but is there a way to create incident ticket identifiers, problem identifiers, and change identifiers? e.g. inc000000001, prb000000001, chg000000001

Thanks in advance.

FYI we are running OTRS 3.0.11 with ITSM 3.0.5
ncallahan
Znuny newbie
Posts: 2
Joined: 23 Jan 2012, 12:24
Znuny Version: 3.1 beta
Real Name: Nathan Callahan
Company: Squiz

Re: AlphaNumeric Ticket number

Post by ncallahan »

crythias wrote:... at first I thought this was SystemID related. I believe it's probably a case sensitivity issue, which probably means that removing the "'A'..'Z'," from
Looks like it's actually related to the regex for matching the incoming Ticket#.

The line (82,83):

Code: Select all

    # check current setting
    if ( $String =~ /\Q$TicketHook$TicketHookDivider\E($SystemID\d{2,20})/i ) {
matches only digits. Making it:

Code: Select all

    # check current setting
    if ( $String =~ /\Q$TicketHook$TicketHookDivider\E($SystemID[\w_]{2,20})/i ) {
should mean that ticket numbers get matched correctly when they contain letters as well.
Post Reply