Closed jon-nfc closed 12 months ago
bump
Hi,
Ticket templates are meant to provide a way to customize the tickets forms in UI, and are probably not applied in API context.
@orthagh, can you confirm that ticket templates are not expected to be applied when a ticket is created through API?
ITIL templates was not taken into account when API was done. They work mainly on UI display. That said a subset of template should work on created ticket via API:
The rest doesn't work:
Thanks for the response @cedric-anne @orthagh
if it's the case that a subset of the templates should work, I can report that nothing works. I even tried using api path http://127.0.0.1/apirest.php/TicketTemplate/{template id}/Ticket
and http://127.0.0.1/apirest.php/ITILCategory/{category id}/Ticket
for ticket creation, to no avail; ticket was created though minus any tempate data.
I even tried using api path
http://127.0.0.1/apirest.php/TicketTemplate/{template id}/Ticket
andhttp://127.0.0.1/apirest.php/ITILCategory/{category id}/Ticket
for ticket creation, to no avail;.
I don't think either of those paths are valid. It probably only works because of how the legacy API parses the URL. It sees only the "Ticket" part at the end and ignores everything else.
There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.
If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.
You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.
Code of Conduct
Is there an existing issue for this?
Version
10.0.9
Bug description
I can post tickets via the api, however the itil category template is not applied to the created ticket. The category displays on the ticket however, without any item from the template. manually creating the ticket, the template applies as it should.
URL: http://127.0.0.1/apirest.php/Ticket Method: POST body:
Response: HTTP/201 Created Response body:
Relevant log output
Page URL
http://127.0.0.1/apirest.php/Ticket
Steps To reproduce
Your GLPI setup information
Information about system installation & configuration
Server
GLPI constants
Libraries
LDAP directories
SQL replicas
Notifications
Plugins list
Anything else?
When i noticed this issue, i removed all template assiging (entity and profile), in a hopes the ITIL category template would be applied, however to no avail.