Close ticket through API

Infos:

  • Used Zammad version: 5.1.x
  • Used Zammad installation type: rpm package
  • Operating system: Centos Stream
  • Browser + version: Brave Version 1.38.117 Chromium: 101.0.4951.67 (Official Build) (64-bit)

Expected behavior:

  • Setting ticket state to closed closes ticket via API

Actual behavior:

  • log error
    PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block

Ticket state does not close

Steps to reproduce the behavior:

can it be that your double quotes in this example are wrong?

Just tried to do it, but i dont receive an error, but my api call (set ticket open) wont work either.

-d '{"state":"closed"}' looks like a better cmd line option.


Note: no zammad expert, just trying to help.

Same string, but with an json header made it work for me.

curl -X PUT -H "Authorization: Token token=<token>" -H 'Content-Type: application/json' -d '{"state":"open"}' http://localhost:3010/api/v1/tickets/3456

1 Like

Have a look at your triggers. Especially those that handle closed tickets.
Possibly there’s an invalid configuration of those. You can double check by disabling them one by one until you find the bad boy.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.