You are not logged in.
Pages: 1
Hello,
I am writing a php script that will transfer ticket from our previous ticketing solution to GLPI 10.
I made a first version for it while we were still on GLPI 9 and had no problem. But now, after the version change I can't set the "closedate" and "solvedate" of the ticket I'm creating. I'd like to know if this is a new rule in GLPI 10 or if the way to do it changed.
Here's an example of which route I call and what I pass to it :
Route : glpi.com/apirest.php/Ticket
Json passed :
{"input": {
"_users_id_requester":12,
"date_creation": "2022-05-11 08:01:20",
"closedate": "2022-05-12 08:03:09",
"solvedate": "2022-05-13 08:03:09",
"date_mod": "2022-05-14 08:03:09",
"date":"2022-05-17 08:01:20",
"content": "Ticket test GLPI10 pbm date",
"users_id": 12,
"itilcategories_id": 25,
"name": "Test de pre set date",
"type": 1}}
Server's answer :
{
"id": 15681,
"message": "Élément ajouté : Test de pre set date"
}
But then in GLPI, the ticket's date are all replaced by the value of the "date" parameter. And if I send it without the "date" parameter it takes today's date as value.
The parameters I'm sending are the one I copied from the "GET Ticket" route.
Thanks in advance
Last edited by H57 (2022-07-04 14:09:26)
Offline
I have the same issue with GLPI 10.
When I try to send a ticket using the API, if the field "date" is NOT set, all the date fields (date_creation, solvedate, closedate) are filled with the current date (the moment I send the API request).
If the field "date" IS set, all the date fields are filled with the same value as the "date" field.
I have tried various things, such as specifying or not the mod_date, or give in the duration of the ticket in the fields "close_delay_stat", with no result.
Offline
Pages: 1