I noticed that ID of the new ticket created is based on auto-increment, which is based on the setting of “HD Ticket” doctype in Frappe framework. I tried to search through the online documents of where the ID is kept and how I can change it (to a different number) but couldn’t find the way to do it.
In the Customize Form - HD Ticket, the naming rule is autoincrement and greyed out. I want to keep the autoincrement, but I would like to reset the number to something else. e.g. the auto-increment number is at 366 (I can see this new HD ticket created and is auto assigned with this number, but I don’t know where this last number is kept). And I would like to set it to 1000 for the next HD ticket being created.
The number automatically increases by 1 based on the previous record in the database. For example, if the current ticket number is 366, the next will be 367.
@gohyc
Sorry for the confusion earlier! Since Frappe uses a sequence for auto-increment in MariaDB instead of mariadb autoincrement, you need to update the value in the sequence.
Open the Frappe console by running this:
bench console
Run the following command to reset the sequence for the HD Ticket table:
frappe.db.sql("ALTER SEQUENCE hd_ticket_id_seq RESTART WITH 1000;")