Ticket numbers in CSV export
Moderator: crythias
Ticket numbers in CSV export
I noticed the following when I export search results to a csv and open it, the ticket numbers are displayed as 2,01506E+15 and so on. On formatting the cell as a number, excel displays ....10000050 as ticket number. However, this is wrong as the correct ticket number should be ....10000059. Is there a way to add for example a # in front of the ticket number during export so it is treated as text instead of a number? Or could anyone give me a hint as to how I can format the cell correctly?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Ticket numbers in CSV export
This is a problem with Excel, and it will round the last digit, too. A way to get around this is to manually import csv and make sure the column is text. Or modify the column to be preceded with an apostrophe (').
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
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
Re: Ticket numbers in CSV export
Manually importing the csv is problematic as one of the exported fields is a textarea and contains line breaks. Thus, the text moves into the first column.
How can I modify the column to be preceded with an apostrophe before opening the csv, since as soon as I open the csv the numbers are either in scientific format or when formatted to number round the last digit?
How can I modify the column to be preceded with an apostrophe before opening the csv, since as soon as I open the csv the numbers are either in scientific format or when formatted to number round the last digit?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
Re: Ticket numbers in CSV export
OTRS4 does allow a special CSV file to be exported for Excel usage
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: Ticket numbers in CSV export
I could do a search and replace using regex. In notepad++ replace ^"\d with "'2. This should be sufficient until we reach the year 3000 as the first part of ticket is the year and thus first digit is 2.
However, this would mean agents having to do the dirty work. I would be interested to know if I could edit the the ticket number with an apostrophe during export.
I'd be thankful about pointers regarding how the data is written into the csv file from OTRS and possibly a way to manipulate it.
EDIT: @jojo I have version 3.3.x though
. Certainly a reason to upgrade to 4.x, but I would like to customize the code to add an apostrophe to the ticket number instead of doing an upgrade to solve the issue.
However, this would mean agents having to do the dirty work. I would be interested to know if I could edit the the ticket number with an apostrophe during export.
I'd be thankful about pointers regarding how the data is written into the csv file from OTRS and possibly a way to manipulate it.
EDIT: @jojo I have version 3.3.x though

OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Ticket numbers in CSV export
what column is the ticket number in for your export?
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
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
Re: Ticket numbers in CSV export
It is the first column ticket number. It is field TicketNumber configured in Ticket::Frontend::AgentTicketSearch###SearchCSVData in Ticket -> Frontend::Agent::Ticket::ViewSearch
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
Re: Ticket numbers in CSV export
Any Ideas how I can manipulate the ticket number as a string in the csv output during export?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache