Modified Ticket Number

Moderator: crythias

Locked
otrsTerrence
Znuny newbie
Posts: 13
Joined: 27 Feb 2013, 03:14
Znuny Version: 3.1.6

Modified Ticket Number

Post by otrsTerrence »

ticket number generator : date (e.g 20130523101)

now, i want to customize as 2013052310001.
so any suggestion of add 3 more digit at last of ticket number?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Modified Ticket Number

Post by reneeb »

Change Kernel/System/Ticket/Number/Date.pm:

old:

Code: Select all

    # count auto increment ($Count++)
    $Count++;
    $Count = $Count + $JumpCounter;
new:

Code: Select all

    # count auto increment ($Count++)
    $Count++;
    $Count = sprintf "%03d", ($Count + $JumpCounter);
Please note that you have to make this change after every update of OTRS!
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
otrsTerrence
Znuny newbie
Posts: 13
Joined: 27 Feb 2013, 03:14
Znuny Version: 3.1.6

Re: Modified Ticket Number

Post by otrsTerrence »

its works, thanks for help ^^
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Modified Ticket Number

Post by reneeb »

Future versions of OTRS can handle that out of the box: https://github.com/OTRS/otrs/commit/663 ... er/Date.pm
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Modified Ticket Number

Post by crythias »

note that excel has a functional limitation of number of digits to be imported via CSV *by default*. It already cannot natively handle OTRS's ticket number (last three digits are zeros), so you may not be happy with your import. Lookup Schema.ini for information how to adjust for that if you need it.
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
Locked