You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2020-01-16 19:43:42

fgarcia
Member
Registered: 2014-06-26
Posts: 12

Aplicar reglas de nuevos tickets creados mediante API REST de GLPI

Buenas,

hemos creado una interfaz web que utiliza la API REST para crear nuevas peticiones en GLPI.  El problema que nos encontramos es que al crear la petición, no se ejecutan las reglas creadas para nuevas peticiones.  No vemos en la API ningún método que ejecute las reglas.  ¿alguna idea de cómo realizar esto?

Utilizamos GLPI 9.3.0.

Gracias y un saludo.
Félix García.

Offline

#2 2020-01-16 21:36:36

mecmav
Member
From: Brasil
Registered: 2019-03-22
Posts: 226

Re: Aplicar reglas de nuevos tickets creados mediante API REST de GLPI

fgarcia wrote:

Buenas,

hemos creado una interfaz web que utiliza la API REST para crear nuevas peticiones en GLPI.  El problema que nos encontramos es que al crear la petición, no se ejecutan las reglas creadas para nuevas peticiones.  No vemos en la API ningún método que ejecute las reglas.  ¿alguna idea de cómo realizar esto?

Utilizamos GLPI 9.3.0.

Gracias y un saludo.
Félix García.

did you set business rules for tickets?

on the screen to setup your rules, you can test all criterions and actions that will be executed without open a ticket for this purpose.

Offline

#3 2020-01-20 08:36:15

fgarcia
Member
Registered: 2014-06-26
Posts: 12

Re: Aplicar reglas de nuevos tickets creados mediante API REST de GLPI

Yes, the business rules for tickets are set, actives and working properly.

Best regards.

Offline

#4 2020-01-20 15:40:15

mecmav
Member
From: Brasil
Registered: 2019-03-22
Posts: 226

Re: Aplicar reglas de nuevos tickets creados mediante API REST de GLPI

fgarcia wrote:

Yes, the business rules for tickets are set, actives and working properly.

Best regards.

Nice. Rules was setted wrong ?

Offline

#5 2020-01-20 18:05:41

fgarcia
Member
Registered: 2014-06-26
Posts: 12

Re: Aplicar reglas de nuevos tickets creados mediante API REST de GLPI

The rules are applied correctly when a ticket is created using the GLPI installation, but they are ignored when the ticket is created using the GLPI REST API. Is there a way for ticket rules to be applied automatically using the GLPI REST API?

Offline

#6 2020-01-20 19:58:22

mecmav
Member
From: Brasil
Registered: 2019-03-22
Posts: 226

Re: Aplicar reglas de nuevos tickets creados mediante API REST de GLPI

fgarcia wrote:

The rules are applied correctly when a ticket is created using the GLPI installation, but they are ignored when the ticket is created using the GLPI REST API. Is there a way for ticket rules to be applied automatically using the GLPI REST API?

Yes, it's possible.

But I guess you setup wrong your rules.

Even with API, the ticket must accept criterions and add actions when these criterions are met.

The rules are applied only all criterions are met. Try to review if you using OR/AND operator, review your criterions and actions.

Offline

#7 2020-01-21 13:39:46

fgarcia
Member
Registered: 2014-06-26
Posts: 12

Re: Aplicar reglas de nuevos tickets creados mediante API REST de GLPI

Already solved. The problem was that I was applying a ticket assignment rule to a user and after creating the ticket with the REST API, the rule applied well, but in the code after calling the API, for some tests I did time, removed the assignment of the ticket to any user, that is, undid what was applied by the rule.

Thank you!

Offline

Board footer

Powered by FluxBB