You are not logged in.
Pages: 1
Hello Guys,
How can I change actors for a specific ticket
appreciate any help
Offline
1) gets actors from tickets :
.../glpi/apirest.php/Ticket/ $ticket_id /Ticket_user/
2) find the actor you want to change ( get id, user_id, ticket id, type from answer
then
$id= the id you get from first request corresponding to the user you wanna change (not the user_id ..
$ticket_id, user_id as usual
$type : 1 requester, 2 technician, 3 observer
payload : {"input" :{ "id": $id "tickets_id":$ticket_id , "users_id":$tuser_id, "type":$type,"use_notification":1 } }
then use PUT method
.../glpi/apirest.php/Ticket/ $ticket_id /Ticket_user/ with payload abaove
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
Thanks this works, but is there a way to do it directly like using :
.../glpi/apirest.php/Ticket/ $ticket_id
payload : {"input":{"_users_id_assign":x,
"_users_id_watcher":x,
"_users_id_requester":x}}
then use PUT method
I tried this but the users doesn"t change
Last edited by aziz (2021-12-14 22:50:56)
Offline
this would mean, a ticket has only 1 requester, 1 observer, 1 technician, in fact a ticket can be associated with many actors :
if you have 2 requesters, wich user shall _users_id_requester refer to ????
that's why you can't change directly.
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
thank you for your help!
Last edited by aziz (2021-12-15 03:49:04)
Offline
Pages: 1