Update Tickets via database

Infos:

  • Used Zammad version: 3.6.x
  • Operating system: Ubuntu
  • Browser + version: Google Chrome
  • MySQL

Hi!

Help me please!
I am executing the SQL statement in the Zammad MySQL database:
update tickets t set t.title = ‘test123’ where t.id = 46;

Changes are taking place in the database. However, through the web interface, I do not see these changes. Even if I refresh the page.

If I make changes in the web interface, then I immediately see them in the database.

The same happens if I update any other fields of the Ticket.

Thanks in advance for your answer.

Never ever execute queries that are not read only on your database directly.
It makes no sense to do that except outplaying the application and may lead to damage and data loss.

Really - don’t.

Use the rails console if you must - better API.

I understand, but I want to modify the Zammad functionality from another application that can only work directly with the database. Is there really no way to make SQL updates?

It’s not recommended nor supported.
Sorry, you have to live with the downsides you experience.

Technically your problem is that cache is not dropped after touching database. You may drop cache by running Cache.clear in Zammad Rails console after updating database. Beware that this is a fragile unsupported solution that will cause issue sooner or later :slight_smile:

Sooner than later. We strongly discourage anyone from changing any value in the database directly - especially at runtime. No matter if the cache is cleared or not. This is error prone to race conditions and leads to unpredictable behaviour and long debugging sessions - headaches included.
That’s what APIs are for. REST or Ruby is the only way to go here.

1 Like

Our program cant to execute api, so we wanted to modify some data directly in the database.

But I realized that you do not recommend doing this.

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