pluginsGLPI / formcreator

GLPI Plugin Formcreator (DOWNLOAD : https://github.com/pluginsGLPI/formcreator/releases)
http://www.teclib-edition.com
GNU General Public License v3.0
174 stars 125 forks source link

Warning: Undefined array key in /glpi/src/Item_Ticket.php #3336

Closed jcervantes-sipecom closed 1 year ago

jcervantes-sipecom commented 1 year ago

Describe the bug When target an answer form to a ticket, or associate it manually, the column "Status of items" and "Location" have the followings errors: Warning: Undefined array key in /glpi/src/Item_Ticket.php

To Reproduce Steps to reproduce the behavior:

  1. Create a Form and target to a ticket
  2. Answer the form and send
  3. Go to the targeted ticket recently created
  4. Go to Items associated
  5. See the form answer, and the columns with error

Expected behavior As the form answer didn't have Status and location, this should shown in blank.

Screenshots

image

GLPI / Plugins (please complete the following information):

Additional context

btry commented 1 year ago

Hi

Could you test this patch ?

https://github.com/btry/glpi/commit/71b9be6d0dd24fbdc29109f24fccba940629a5a7

jcervantes-sipecom commented 1 year ago

Hi @btry, now I got an issue, I've updated to the last version 2.13.7, and the option "Form Answer" doesn't show in the dropdown list to be selected on the ticket Items associable:

image

Also I did the change or the patch in the GLPI core that you recomended.

I another instance that I haven't updated to the last version, "Form Answer" do appear:

image

btry commented 1 year ago

To see form answers in items of tickets, you must check your profile. Open tab assistance and ensure that the list of items associable to ticket contains form answers. If not, add it then try again.

jcervantes-sipecom commented 1 year ago

Ah ok @btry you where right, now it's appear again. Also as I said, I applied the patch and the Status and Location doesn't have the error again:

image

btry commented 1 year ago

Hi

I did an error in the patch. It is not harmful.

It has been fixed today. You may want to cancel the patch then apply the latest version. I expect the fix will be available in the next release of GLPI.