For migration purposes I need to set the created_at field of tickets and articles objects. The migration process is done through the Zammad REST API.
I tried to set the field at creation time (POST on /api/v1/tickets and /api/v1/ticket_articles) and using update (PUT on /api/v1/tickets and /api/v1/tickets_articles), but the created_at field stay unchanged.
Thanks!
Infos:
Used Zammad version: 2.3.x
Used Zammad installation source: Official Debian package
Operating system: Ubuntu 16.04 Server
per default created_at is only allowed to set via API in import mode. If you have a “productive” Zammad, the created_at (and updated_at) is set by the server.
Because:
In a productive environment you do not want to get ticket from the past or from the feature (it’s also SLA related)
zammad run rails r 'Setting.set("import_mode", true)'
Note: If Zammad in import mode, almost observer will not run (e. g. agent notifications or sending emails in general). After you have imported you old data, you need to rebuild the search index once:
thanks for the fast response - even if it’s not the answer I’d like to hear…
Background: we have developed an addin for Outlook, which takes an email, looks up the operating-data in zammad (maps the user, looks if already a ticket for the conversation exists or even the mail was already transferred to zammad) and gives it to zammad via the api.
It’s intended for soft-migration of the mail-traffic to zammad.
Understood
I’m going to set import_mode to true, as it seems not to hurt in any way.
(soft-migration, because I’d like to make every email run over zammad and get rid of outlook some day - it’s not that easy, because of the user-factor…)