formcreator
formcreator copied to clipboard
Missing number of documents and document URIs on ticket creation from formcreator
Describe the bug When formcreator creates a ticket from a form, number of documents remains at 0 and no document URI is added. (Respectively: ##lang.ticket.numberofdocuments##: ##ticket.numberofdocuments## and ##document.filename## )
To Reproduce Steps to reproduce the behavior:
- Create a form containing a question of type File and a target of type Target ticket
- Use this form to create a ticket.
Expected behavior Ticket ##ticket.numberofdocuments## must be set to 1, ticket ##document.filename## must point to the document selected in the form.
Additional context Form Creator 2.9.1
Hi
Related to this topic: https://forum.glpi-project.org/viewtopic.php?pid=457931#p457931
Currently, the plugin creates the ticket then adds documents.
Need to find a solution to delegate document creation to the ticket itemtype.
Fixing this issue should be delayed until GLPI 9.5 is released, because if a patch related to uploads handling.
https://github.com/glpi-project/glpi/pull/6936
Hi
i'll investigate on this issue when the plugin will drop compatibility with GLPI 9.4. This is needed to not add mess in the code with backward compatibility. Handling file uploads is too easy to break.
Hi,
This issue is still present in 9.5.6. I have a really messy workaround (with hardcoded fields to check). The main issue for me is to automatically detect that a field is for file type. Probably I could check that there is an array of type "prefix_formcreator_field...".
If you have a better idea...