Skip to main content
Version: 8.5.0

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.

note

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.

  1. 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.

  1. Execute the below query (Make sure the count is zero or else do not perform the execution further)

    select count(1) from change;

  2. 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;

  1. Execute below command to begin the transaction:

    begin transaction;

  2. Update the sequence using the below query (Note the Table row updated):

    update sequenance set lastid = 0 where model = 103 and seqname = 'CHG';

  3. Execute the below command:

    commit;

  4. 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.

  1. Now, when you create a change request, its ID will start from 1 instead of continuing from the previous count.