formcreator icon indicating copy to clipboard operation
formcreator copied to clipboard

Missing number of documents and document URIs on ticket creation from formcreator

Open kabassanov opened this issue 5 years ago • 4 comments

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:

  1. Create a form containing a question of type File and a target of type Target ticket
  2. 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

kabassanov avatar Feb 10 '20 08:02 kabassanov

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.

btry avatar Feb 10 '20 08:02 btry

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

btry avatar Apr 16 '20 09:04 btry

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.

btry avatar Jul 30 '20 13:07 btry

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...

kabassanov avatar Nov 03 '21 17:11 kabassanov