How to Reset Ticket ID Count?
Overview
Resetting the ticket ID count is a crucial task that many organizations encounter when managing their support and service systems. A well-organized ticketing system not only improves efficiency but also enhances the customer experience. This article provides a step-by-step guide on how to reset your ticket ID count, ensuring your system is orderly and functioning smoothly. Whether you are dealing with duplicate IDs, starting fresh, or simply cleaning up, this guide will help you reset your ticket IDs safely and efficiently.
The below procedure applies to all modules.
Prerequisites
All tickets must be deleted from the Archive folder.
Procedure
To reset the ticket-ID count or sequence, follow the below steps. Here, the sequence of the Change Module is reset.
Login to the Terminal server with root user and enter the following commands to connect to the Database.
```
sudo -i
su postgres
psql
\c flotoitsmdb
set search_path to apolo;
```Once completed, a confirmation message will appear.
Execute the below query (Make sure the count is zero or else do not perform the execution further)
select count(1) from change;
Check the sequence state of the module whose count you want to reset by executing the query below. ( For example, 103 for change)
select * from sequenance;
Execute below command to begin the transaction:
begin transaction;
Update the sequence using the below query (Note the Table row updated):
update sequenance set lastid = 0 where model = 103 and seqname = 'CHG';
Execute the below command:
commit;
Check the sequence state of the module whose count you want to reset (103 for change) by executing the query again.
select * from sequenance;
The lastid will change to 0.
- Now, when you create a change request, its ID will start from 1 instead of continuing from the previous count.