Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket number collision #378

Closed
nunolbb opened this issue Nov 8, 2018 · 8 comments
Closed

Ticket number collision #378

nunolbb opened this issue Nov 8, 2018 · 8 comments
Assignees
Labels

Comments

@nunolbb
Copy link

nunolbb commented Nov 8, 2018

CUSTOMER ARE GENERATING THE SAME CALL NUMBER.

EXAMPLE: CLIENT NUMBER 1 - OPENED CALL # 195019, WHICH IS ALREADY CLOSED.
THE SYSTEM IS GENERATING THE SAME CALL NUMBER, FOR CUSTOMER NUMBER 2 # 195019. WHEN I CLICK ON THE CUSTOMER CALL 2 HE ISSUES ME FOR THE CUSTOMER 1.

@nunolbb nunolbb changed the title Chamado sendo encaminha para outro cliente. GERANDO MESMO NÚMERO DE CHAMADO. CLIENTES DIFERENTES! Nov 8, 2018
@nickbe
Copy link

nickbe commented Nov 8, 2018

Can you please post your questions in english so that everyone can participate?

@nunolbb
Copy link
Author

nunolbb commented Nov 8, 2018

OK

@nunolbb
Copy link
Author

nunolbb commented Nov 8, 2018

CUSTOMER ARE GENERATING THE SAME CALL NUMBER.

EXAMPLE: CLIENT NUMBER 1 - OPENED CALL # 195019, WHICH IS ALREADY CLOSED.
THE SYSTEM IS GENERATING THE SAME CALL NUMBER, FOR CUSTOMER NUMBER 2 # 195019. WHEN I CLICK ON THE CUSTOMER CALL 2 HE ISSUES ME FOR THE CUSTOMER 1.

@nunolbb nunolbb changed the title GERANDO MESMO NÚMERO DE CHAMADO. CLIENTES DIFERENTES! GENERATING SAME CALL NUMBER. DIFFERENT CUSTOMERS! Nov 8, 2018
@nunolbb
Copy link
Author

nunolbb commented Nov 8, 2018

I verified that the client can not close the ticket, because this ticket is from another client.

I as administrator also can not close this repeated ticket from another client.

@ivandiazwm ivandiazwm changed the title GENERATING SAME CALL NUMBER. DIFFERENT CUSTOMERS! Ticket number collision Nov 8, 2018
@ivandiazwm
Copy link
Contributor

Ok, I've found the reason for this.
https://github.com/opensupports/opensupports/blob/master/server/models/Ticket.php#L99
We're calculating the next ticket number by counting when we should use the last ticket id instead.
The problem is that if you delete a ticket and it's not the last created, the next ticket number created will collide with the last ticket. This can happen in two two ways: by individual ticket deletion (not relased yet) or by deleting an user with tickets.
@nunolbb Thanks for the reporting this, I'll release a hotfix for the current version.

@ivandiazwm ivandiazwm self-assigned this Nov 8, 2018
@ivandiazwm ivandiazwm added the bug label Nov 8, 2018
@nunolbb
Copy link
Author

nunolbb commented Nov 8, 2018

blz!!!

@nunolbb
Copy link
Author

nunolbb commented Nov 8, 2018

How do I put those codes? I understand only the basics of programming.
This system is helping me a lot here in the company. Very cool!

ivandiazwm added a commit to ivandiazwm/opensupports that referenced this issue Nov 8, 2018
@ivandiazwm
Copy link
Contributor

@nunolbb Please download and decompress this file in your OpenSupports' installation.
This will solve the issue for future ticket creation, for the current collision, change one of the colliding ticket_numbers to 1 directly in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants