You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-10-19 07:14:16

Kramito
Member
Registered: 2023-02-10
Posts: 16

Return ticket's number format after Behaviours plugin.

Hello!
Is it possible to return the "ticket's number format" to its original form after using the Behaviours plugin?
If there is such a possibility, please tell me how to do it.
GLPI 10.0.9

Last edited by Kramito (2023-10-19 08:02:08)

Offline

#2 2023-10-19 12:45:03

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: Return ticket's number format after Behaviours plugin.

Yes, for new tickets at least. Set the ticket ID format back to the empty "-----" option in the plugin configuration or uninstall the plugin.
Then, go to your database and run:
SELECT MAX(id) FROM glpi_tickets;

That will give you the highest ticket ID currently assigned.
Next, you will need to reset the auto-increment setting so that it starts automatically assigning IDs starting with the next available ID:
ALTER TABLE glpi_tickets AUTO_INCREMENT=MAX+1

Replace "MAX + 1" with the next number after the one returned with the first query.
Make sure to backup your database before making this change.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2023-10-19 13:21:33

Kramito
Member
Registered: 2023-02-10
Posts: 16

Re: Return ticket's number format after Behaviours plugin.

cconard96 wrote:

Yes, for new tickets at least. Set the ticket ID format back to the empty "-----" option in the plugin configuration or uninstall the plugin.
Then, go to your database and run:
SELECT MAX(id) FROM glpi_tickets;

That will give you the highest ticket ID currently assigned.
Next, you will need to reset the auto-increment setting so that it starts automatically assigning IDs starting with the next available ID:
ALTER TABLE glpi_tickets AUTO_INCREMENT=MAX+1

Replace "MAX + 1" with the next number after the one returned with the first query.
Make sure to backup your database before making this change.


Thank you!

Offline

#4 2023-10-20 08:27:40

repentandliveholy
Member
Registered: 2023-09-18
Posts: 49

Re: Return ticket's number format after Behaviours plugin.

Thanks!..

This worked for me and should for everybody:

1. Change older IDs of all tickets to normal ones in order old order
2. Find the max ID of the application yourself or SELECT MAX(id) FROM glpi_tickets;
3. ALTER TABLE glpi_tickets;
4. AUTO_INCREMENT = number above + 1;

Last edited by repentandliveholy (2023-10-23 15:20:16)

Offline

#5 2023-10-23 15:00:28

Kramito
Member
Registered: 2023-02-10
Posts: 16

Re: Return ticket's number format after Behaviours plugin.

cconard96 wrote:

Yes, for new tickets at least. Set the ticket ID format back to the empty "-----" option in the plugin configuration or uninstall the plugin.
Then, go to your database and run:
SELECT MAX(id) FROM glpi_tickets;

That will give you the highest ticket ID currently assigned.
Next, you will need to reset the auto-increment setting so that it starts automatically assigning IDs starting with the next available ID:
ALTER TABLE glpi_tickets AUTO_INCREMENT=MAX+1

Replace "MAX + 1" with the next number after the one returned with the first query.
Make sure to backup your database before making this change.


Unfortunately it didn't help. I did everything as you indicated, but the system still created a new ticket with the old numbering format +1  sad

Offline

#6 2023-10-23 15:19:00

repentandliveholy
Member
Registered: 2023-09-18
Posts: 49

Re: Return ticket's number format after Behaviours plugin.

Yes, it didnt work for me also because a lack of instruction. Take one which I posted - above - this works 100%.

Offline

#7 2023-10-24 07:30:31

Kramito
Member
Registered: 2023-02-10
Posts: 16

Re: Return ticket's number format after Behaviours plugin.

repentandliveholy wrote:

Yes, it didnt work for me also because a lack of instruction. Take one which I posted - above - this works 100%.

Thanks, i'll try your method. smile

Offline

#8 2024-09-12 12:50:06

krishna.ms
Member
Registered: 2013-12-20
Posts: 21

Re: Return ticket's number format after Behaviours plugin.

We want to have 2 different numbers for Incident Management and Change Management. Is this possible?

Offline

Board footer

Powered by FluxBB