You are not logged in.
Pages: 1
Topic closed
Hi
I think we found a bug on that plugin.
Step by step to have the error: GLPI 9.4.2 OR 9.4.5 still the same error and with plugin behavior 2.2.1 or 2.2.2
In configuration of plugin we need set:
--> "Requester is mandatory" to "yes";
When try create an ticket using apirest.php/Ticket/ (POST), passing exactly these values:
{
"input": {
"users_id":1775,
"type":1,
"itilcategories_id":45,
"requesttypes_id":6,
"urgency":4,
"impact":4,
"priority":3
}
}
we get the following error "[
"ERROR_GLPI_ADD",
"Requerente é mandatório"
]"
even passing the id of requester to the field "users_id", I'm getting this error.
Only add the ticket when the "Requester is mandatory" is "no".
Am I doing something wrong or this is really a bug?
Offline
In Behaviors plugin i used same value as in the core of GLPI.
If you create a ticket in GLPI or with the plugin Webservices you don't have this issue, so the issue is in the API.
I move your post in API part
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Yes, at creating a ticket in GUI GLPI even when the plugin config "Requester is mandatory" setted to "Yes", we have no problem, the behavior work as expected. but in the API the same option defined to "yes", we provide that field value and get the error.
I didn't try by webservices, but by API having this error.
With differents versions of GLPI core and plugin behavior, this erros occurs.
Thanks by your reply.
We need wait for a correction or already have a commit for it ?
Last edited by mecmav (2020-02-26 19:18:35)
Offline
I'm using API for integrate with other systems.
So I need to know if have any commit for it, or we have need to wait for a new release??
I need this behavior "requester is mandatory" setted to "yes", and haven't a way to use webservices in this case, because all the integration was made for API.
Offline
Anyone with this behavior ?
Offline
Hello,
I'm facing exactly the same issue as you unfornatly,
That is blocking us on a script to create tickets from our monitoring tools
Did you manage to fixe the bug ? or to bypass it with behavior enabled
GLPI version : 9.4.4
Behaviors version : 2.2.2
Thanks in advance
Best regards,
Last edited by Balex (2020-04-21 16:34:23)
Offline
i think users_id_requester is missing in JSON payload
{
"input": {
"users_id_requester":1775,
"type":1,
"itilcategories_id":45,
"requesttypes_id":6,
"urgency":4,
"impact":4,
"priority":3
}
}
Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9
Offline
Bonjour LaDenrée,
Sorry for the lack of information on my issue but I got well this information in my curl POST,
exemple of a try :
curl -X POST -H 'Content-Type: application/json' -H "Session-Token: mysessiontoken" -H "App-Token: myapptoken" -d '{
"input":
{
"status":2,
"urgency":3,
"impact":3,
"priority":3,
"itilcategories_id":0,
"_users_id_requester":10037,
"type":1,
"requesttypes_id":10001,
"users_id":10037,
"name": "test API"
}
}' "http://myserver/glpi/apirest.php/Ticket/"
and it return : "ERROR_GLPI_ADD","Demandeur est obligatoire" ( in english : ERROR_GLPI_ADD","Requester is mandatory" )
and it's the same even without the "_" in font of "users_id_requester"
And without the plugging I got well the requester field with the user
Thanks and best regards,
Last edited by Balex (2020-04-22 11:59:41)
Offline
Mea culpa ..!
I double checked just now,
with "_users_id_requester" it works !
and it's not with "users_id_requester"
I'm so sorry, my bad typo error !
Thanks Ladenrée for the tips !
Thanks again and best regards !
Offline
Pages: 1
Topic closed