Articles are displayed with random order after API creation

Infos:

  • Used Zammad version: 4.1.0-6
  • Used Zammad installation type: docker-compose
  • Operating system: Ubuntu Linux 20.04
  • Browser + version: Firefox 89.0.2

Expected behavior:

  • The ordering of the articles in the ticket view should be ascending based on the field created_at.

Actual behavior:

  • The ordering for a ticket created via the API looks random. Even though the fields created_at and updated_at has been updated with the correct (ascending) values. The articles has been imported / created in the correct order, so the IDs are also in sequence. This could be verified by requesting the ticket and article data via the API.

Steps to reproduce the behavior:

  • Enter the rails console and enable import mode with
Setting.set('import_mode', true)
Setting.set('system_init_done', false)
  • Create a ticket with state=closed via the API and make sure that the fields created_at and updated_at are filled with the correct historical values.
  • Add some articles to the newly created ticket via the API and make sure that the fields created_at and updated_at are filled with the correct historical values with ascending order.

Stupid me!
I have created a faulty custom date field (%h instead of %H) and sorted my source data by that.

Completely user error.
Forget about this.
Sorry!

1 Like

One side note to above mentioned settings:
Note that import_mode and system_init_done are crucial parts of Zammad.

Only tweak them if you know what you’re doing and ensure you provide correct data.
Running above way in production is no good idea.

I’m sure OP is aware of this, just making sure for future anons finding this.

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