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
Form does not insert attachments in ticket #1367
Comments
Hi I have several reports about this issue. Your observation is interestiing, this might help me to solve it. Please stay tuned next week. |
Hi I created 2 forms : one with a file field and an other with a textarea and a file field. Both wotks for me. Could you export the 2 forms and send them to me ? Maybe there is an other difference which is important to trigger the bug. |
I discovered another detail, the error occurs only when I move the field ... for example ... if I just create the attachment field it works, if I move it to another position it stops working ... it follows export from the pre and after move |
Where do you do this move : in the target ticket, or when you reorder the questions of the form ? OK, I think the answer is in the JSONs ;) I'll give a try |
I still don't reproduce : I imported the version of your form before the move, tested it, then moved the file field before the urgency question, and tested it again. I still have the uploaded file in the generated ticket. |
If you have a testing instance of GLPI, could you try the current develop branch of the plugin and feedback if the bug still occurs ? |
Unfortunately I do not currently have a testing GLPI, by the time I resolved not moving the field. One more information that might help is that I'm coming from another version, it was in GLPI 9.2.1 and I went to 9.4.4.1, and the formcreator was in 2.5.2 and I went to 2.8.0. I got many bugs in this migration, it could have been caused by this. |
By checking the source code or trying to reproduce in various ways, there is nothing obvious yet. Could you identify 2 answers for the form
Take note of the ID of both. Next, in the table glpi_plugin_formcreator_form_questions, find the row matching the file question of the form, and take note if its ID. Lets call it qID In the table glpi_plugin_formcreator_answers you whould find 2 rows :
select * from glpi_plugin_formcreator_answers where plugin_formcreator_formanswers_id in ( faID1, faID2 ) AND plugin_formcreator_questions_id = qid I want to compare the value of the column answer for the returned rows. |
Hi The row with the foreign key = 181 exists in your screenshot. It is the 3rd line starting from the bottom. However, the column "answer" contains [] which means that no document was taken into account while saving answers. I think the issue is here : the document is uploaded but ignored by the plugin for some reason. |
Hi when you reproduce the bug, do you confirm t hat the file is added in the documents of GLPI and you can download it ? (in Management > Documents) |
Hi Please test the above patch and feedback. Files should no longer be lost now. The loss occurs in the following scenario
|
I have GLPI 9.4.4.1 and formcreator 2.80 and when I try to open a ticket through the form the attachment is not included, I ran some tests and the attachment is included only when there is only the files field, if any other add the ticket is opened without the file.
example dont attach
example attach
The text was updated successfully, but these errors were encountered: