Closed fabriceverkor closed 1 year ago
Hi
I think that your SQL query is wrong. If you use items_id, you must specify a criteria for itemtype. The query should be
SELECT from glpi_tickets where not exists (select from glpi_plugin_formcreator_issues where itemtype='Ticket' AND items_id=glpi_tickets.ID) AND is_deleted=0 AND solvedate IS NULL.
2nd point : if the form generated several tickets then the table glpi_plugin_formcreator_issues does not have any row for the tickets. Instead it has a row for the form answer.
You may find the tickets with query like
SELECT from glpi_tickets where not exists (select from glpi_plugin_formcreator_issues where itemtype='PluginFormcreatorFormAnswer' AND items_id=42) AND is_deleted=0 AND solvedate IS NULL.
42 should be replaced with a formanswer id. You may find it by finding the rows in glpi_items_tickets where tickets_id is the id of the ticket you don't find and itemtype is PluginFormcreatorFormAnswer.
Sorry for the mistake. So I guess the only problematic tickets (5 tickets) were those created with a form which has a single target and were fixed by the 'php bin/console plugins:formcreator:syncissues' command. The problem is much less significant then. But any idea why it happened ? Should I cronify a regular syncissues ?
The sync issue command has to be used when there is a problem like yours.
Search instead if there are SQL or php errors at the datetime of creation of the missing tickets.
It is possible that a unreleased fix will address your problem. You may be interested to test the branch release/2.13.8 .
If you're not able to build the plugin, I may share a build. Just ask.
I found the following error in logs : [2023-10-30 11:58:10] glpiphplog.CRITICAL: *** Uncaught Exception Error: Undefined class constant 'ANONYMIZE_USE_GENERIC_USER' in /var/www/glpi/marketplace/formcreator/inc/issue.class.php at line 507 Backtrace : src/CommonDBTM.php:3789 PluginFormcreatorIssue->rawSearchOptions() src/Search.php:7884 CommonDBTM->searchOptions() src/Search.php:7679 Search::getOptions() src/Search.php:2763 Search::getCleanedOptions() src/Search.php:2570 Search::displayCriteria() src/Search.php:171 Search::showGenericSearch() marketplace/formcreator/front/issue.php:68 Search::show()
The time correspond to opening date of a ticket having the pb. According to a post in GLPI forum, We had to update to 10.0.10, what I did the evening. It solved the problem above but problematic tickets remained unfixed.
So finaly, the good procedure is :
Hi
An enhancement in Formcreator has been done to better support anonymization features of GLPI. This broke compatibility with older releases of GLPI 10.0.x. If I remember well, the minimum version of GLPI is 10.0.7. As you're using 10.0.10, this error should not occur anymore. To investigate deeper, you should find the version of Formcreator and GLPI at that date. I guess you had GLPI 10.0.6 or lower, with Formcreator 2.13.6 or later.
link: https://github.com/pluginsGLPI/formcreator/issues/3376
Describe the bug Some tickets generated through Forms cannot be seen by requesters in their requested assistances of Self-service interface.
I can list them by SQL request below : SELECT from glpi_tickets where not exists (select from glpi_plugin_formcreator_issues where items_id=glpi_tickets.ID) AND is_deleted=0 AND solvedate IS NULL
They are to categories : 1- tickets generated by forms with several targets (2 ou 3 ticket targets). Most of them 2- tickets generated by form with a single target.
As explained in issue #3319, I used the command below : php bin/console plugins:formcreator:syncissues -> Step 1/2... OK. -> Step 2/2... OK. Done. It solved the problem for the tickets of second category above but not for the tickets of first category.
To Reproduce I could not reproduce the problem by using the concerned forms.
Expected behavior Users should see their assistance requests in self-service interface, meaning that a record corresponding to created tickets by forms should exist in glpi_plugin_formcreator_issues.
GLPI / Plugins (please complete the following information):
Install Method: Marketplace fields Name: Additional Fields Version: 1.20.0 State: Enabled
Install Method: Marketplace badges Name: Badges Version: 3.0.0 State: Not installed
Install Method: Marketplace behaviors Name: Behaviours Version: 2.7.2 State: Enabled
Install Method: Marketplace connections Name: Connections Version: 10.0.0 State: Enabled
Install Method: Marketplace datainjection Name: Data injection Version: 2.13.3 State: Enabled
Install Method: Marketplace archimap Name: Diagrams Version: 3.3.0 State: Installed / not activated
Install Method: Marketplace formcreator Name: Form Creator Version: 2.13.7 State: Enabled
Install Method: Marketplace glpiinventory Name: GLPI Inventory Version: 1.2.1 State: Enabled
Install Method: Marketplace geninventorynumber Name: Inventory number generation Version: 2.8.3 State: Enabled
Install Method: Marketplace addressing Name: IP Adressing Version: 3.0.1 State: Enabled
Install Method: Marketplace oauthimap Name: Oauth IMAP Version: 1.4.2 State: Enabled
Install Method: Marketplace genericobject Name: Objects management Version: 2.14.8 State: Enabled
Install Method: Marketplace screenshot Name: Screenshot Version: 2.0.2 State: Enabled
Install Method: Marketplace singlesignon Name: Single Sign-on Version: 1.3.3 State: Enabled
Install Method: Manual tag Name: Tag Management Version: 2.11.6 State: Enabled
Install Method: Marketplace
Desktop (please complete the following information):
Additional context
We upgraded to 10.0.10 on Monday 30th October. But in SQL request above, I can see tickets without corresponding record in glpi_plugin_formcreator_issues which created before , and with forms which several ticket targets.
Thanks for your help