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

[Formcreator 2.13.18][GLPI 10.0.10] New forms are linked to old tickets #3441

Closed
usrqmor opened this issue Jan 8, 2024 · 9 comments
Closed

Comments

@usrqmor
Copy link

usrqmor commented Jan 8, 2024

Greetings,

I saw some time ago when a user told me he saw requests from another user so I checked.
I found that forms linked to the tickets they created but I dont know why they linked too to old tickets.

So users can see old tickets or information from other users.

To Reproduce
Create a form with a Self-service user
Go to the menu "My requests for assistance"
Click on one of your request then go to "Historical"

Expected behavior
You may see another form that the one created from another user.

Screenshots
image

GLPI / Plugins (please complete the following information):

  • GLPI 10.0.10
  • news Name: Alertes Version: 1.12.1 State: Enabled
    Install Method: Marketplace
    fields Name: Champs supplémentaires Version: 1.21.6 State: Enabled
    Install Method: Marketplace
    behaviors Name: Comportements Version: 2.7.2 State: Enabled
    Install Method: Marketplace
    mydashboard Name: Dashboard Version: 2.1.5 State: Enabled
    Install Method: Marketplace
    datainjection Name: Data Injection Version: 2.13.4 State: Enabled
    Install Method: Marketplace
    formcreator Name: Form Creator Version: 2.13.8 State: Enabled
    Install Method: Marketplace
    tag Name: Gestion des tags Version: 2.11.7 State: Enabled
    Install Method: Marketplace
    glpiinventory Name: GLPI Inventory Version: 1.3.4 State: Enabled
    Install Method: Marketplace
    metademands Name: Meta-Demandes Version: 3.3.7 State: Enabled
    Install Method: Marketplace
    oauthimap Name: Oauth IMAP Version: 1.4.3 State: Enabled
    Install Method: Marketplace

Desktop (please complete the following information):

  • Windows 10/11
  • Edge
  • Version 120.0.2210.121

Thanks for your help.
Best regards

@btry
Copy link
Collaborator

btry commented Jan 8, 2024

Hi

I remember that there was a bug, maybe 2 or 3 years ago, which caused this problem.

It has been solved, but this may persist because of data in a table of the plugin.

You may try to rebuild the assistance requests from glpi console (bin/console command).

Are you able to reproduce this problem with a ticket generated by version 2.13.8?

@usrqmor
Copy link
Author

usrqmor commented Jan 8, 2024

Hi @btry,

I apply the command php console plugins:formcreator:syncissues then create a ticket but the problem is still there.
image

It still links to old tickets and it happens for each new form from what I see

@usrqmor
Copy link
Author

usrqmor commented Jan 9, 2024

I don't know if its possible or not to show the menu "My tickets" instead of the menu "Request for assistance" temporary ?

@btry
Copy link
Collaborator

btry commented Jan 9, 2024

It is possible by changing the translation.

But the words have been chosen this wak because the page doesn't shows tickets. It shows a mix of tickets and form answers, based of the technical design of the plugin

@usrqmor
Copy link
Author

usrqmor commented Jan 9, 2024

Thanks for the reply. Do you have an idea how to clean the link with the oldest tickets on the forms ? I think it's possible with a SQL query but I prefer to not use this option.
There is some form that users shouldn't see but because of this linking situation with old tickets, we have a problem with private informations on some forms that shoudn't be visible.
Thanks

@btry
Copy link
Collaborator

btry commented Jan 9, 2024

I could not investigate yet.

@usrqmor
Copy link
Author

usrqmor commented Jan 10, 2024

Hi @btry
After asking some help from a colleague, I found why I have this problem.
Some years ago, I couldn't properly update formcreator on my instance and had to delete all the table of the plugin (first in test, then in production after constating no issue).
But i didn't delete the line from the table items_ticket. So after reinstalling and using a lot formcreator, the id of the forms answer are double in the table.

I created 2 queries to delete the double and to delete the old line in the table items_tickets. I used them in my test instance and the problem is solved there. I didn't encounters bug so it seems fine.
But I know that using sql queries can be bad so can you tell me if its fine ? I can share my queries if needed.

Thank you

@btry
Copy link
Collaborator

btry commented Jan 10, 2024

Hi

Based on the events you described, your analysis is consistent. Your solution is good.

@usrqmor
Copy link
Author

usrqmor commented Jan 10, 2024

Thanks for the reply and for you help.
Have a nice day !

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

No branches or pull requests

2 participants