We did this after our initial test prior to going live. I had the below instructions copied from another post I found somewhere, not my own work -
How to Delete All Tickets from Database to Reset Ticket Numbering to 1
Resetting ticket numbering in Web Help Desk (WHD), such as when you need to reset ticket numbering to start at 1, may require ticket deletion (ticket deletion is required only if you want to move the ticket number backward; if you want to increase the ticket number, you don't need to delete tickets).
Important: Always make sure you perform a full database backup before deleting anything from the database!
See Database Migration Options for information on backing up your WHD database. For PostgreSQL backup details, see Chapter 24. Backup and Restore in the PostgreSQL 9.2.6 Documentation. For SQL Server backup details, see Back Up and Restore of SQL Server Databases. For MySQL backup details, see Chapter 1. Backup and Recovery from MySQL Backup and Recovery documentation.
After backing up your database, perform the following three basic steps:
- Delete all rows from database tables.
- Delete all tickets from database.
- Reset ticket numbering.
The following subsections describe how to perform each step.
1. Delete All Rows from Database Tables
To delete all rows from a table, use the following SQL syntax:
DELETE from [table name];
WARNING: This destructive action cannot be undone! Make sure you have performed a full backup before deleting anything from the database.
The tables from which to delete rows *before* removing tickets are:
You must delete these database table rows *before* performing any further steps, so ignore the warning and remove all rows for each table.
2. Delete All Tickets from Database
Once you have cleared out the above tables, use the following SQL syntax for deleting tickets:
DELETE from JOB_TICKET;
3. Reset Ticket Numbering
Finally, reset the ticket counter to the desired value, which is shown below as . The counter can begin at any number you choose, using values going forwards or backwards. Use one of the following methods to reset ticket numbering:
Issue the following SQL:
Set UNIQUE=<starting_number> for JOB_TICKET;
MySQL, SQL Server, and OpenBase
Edit the EO_PK_TABLE and find the row with NAME='JOB_TICKET';
Set the PK value for this row to <starting_number>.
Use the following SQL syntax:
ALTER SEQUENCE job_ticket_seq RESTART WITH<starting_number>;
Where is the ticket number starts from .
1 of 1 people found this helpful
If you have any completed surveys in the database you need to run this statement first before the steps listed above
UPDATE SURVEY_RESPONSE SET TICKET_ID=null
UPDATE dbo.EO_PK_TABLE SET PK = 100000
Since i was only looking to push the first ticket number out 100 thousand so i can properly import all of my active tickets from the legacy system, this solution is very much exactly what i needed. Thank you again.