Errors Encountered During OTRS to Zammad Migration


  • Used Zammad version: 6.1.0
  • Used Zammad installation type: docker-compose
  • Operating system: Windows into docker
  • Browser + version: Google Chrome

Expected behavior:

  • Successful migration from OTRS version 6.0.24 to Zammad version 6.1.0 following the official migration documentation, without any errors during the process either via web interface or console.

Actual behavior:

  • Encountering an error while trying to migrate from OTRS to Zammad through the web interface. The error message received on every request made to the OTRS import API is as follows:
    "message": "undefined method `first' for #<Ticket:: id: 5, name: \"closed\", note: nil, updated_by_id: 1, created_by_id: 1, created_at: \"2023-10-18 18:44:13.259000000 +0000\", updated_at: \"2023-10-18 18:44:13.259000000 +0000\">",
    "result": "error"
  • Additionally, when attempting to set the import endpoint via the console, the following error is encountered:
irb(main):001:0> Setting.set('import_otrs_endpoint', 'https://xxx/otrs/')
/opt/zammad/app/models/setting.rb:38:in `set': Can't find config setting 'import_otrs_endpoint' (RuntimeError)

Steps to reproduce the behavior:

  • Install Zammad version 6.1.0 using docker-compose on a Windows machine running Docker.
  • Follow the official Zammad documentation for migrating from OTRS to Zammad.
  • Attempt the migration through the Zammad web interface, observe the error on every request to the OTRS import API.
  • Attempt to set the import endpoint via the console using the command provided in the official documentation, observe the error regarding the inability to find the config setting ‘import_otrs_endpoint’.

Do you have some information from the production.log?

The log does not show much, where I see that error in the Zammad interface during the migration. When making requests

root@d2a9059ea050:/opt/zammad# tail -f log/production.log -n 500
I, [2023-09-13T05:31:37.417029#4021-6320] INFO – : Using Zammad’s file store as Rails cache store.
I, [2023-09-13T05:31:37.417319#4021-6320] INFO – : Using the File back end for Zammad’s web socket session store.

Okay, then some simple question.

At which place are you receiving this mentioned error message (“undefined method …”).

About the “Setting.set”, did you use the correct docker container for executing this?

I didn’t see any problems with the OTRS-Migrator in the last weeks, but I will try it also shorty locally later.

Thank you seriously.
The error is in two places.

  1. Migration attempt from console:
    docker exec -it -u root zammad-docker-compose-zammad-railsserver-1 /bin/bash

rails c

Setting.set(‘import_otrs_endpoint’, ‘’)
/opt/zammad/app/models/setting.rb:38:in `set’: Can’t find config setting ‘import_otrs_endpoint’ (RuntimeError)

  1. Migration attempt from the interface
    GET http://localhost:8080/api/v1/import/otrs/import_status?_=1698070084701
    “message”: “undefined method `first’ for #\u003cTicket::StateType id: 5, name: "closed", note: nil, updated_by_id: 1, created_by_id: 1, created_at: "2023-10-23 14:03:10.925000000 +0000", updated_at: "2023-10-23 14:03:10.925000000 +0000"\u003e”,
    “result”: “error”

And I know that it continues, because many requests arrive to the API but all with the same error, until after 14 hours, it stops working

I think I found the root cause. Can you maybe share your states from the OTRS side?

This should be fixed in the develop + stable version.

Sure ::))
Here my states into OTRS

These are the states, and there is at least one in a Closed state.
I was reviewing what you posted on GitHub but sorry, I don’t know exactly what I should do?

Or where can I find that developer version of zammad to do the migration. It’s just that I want to keep zammad in production and now I’m doing these tests to finally do it in a productive environment

Thanks this list is confirming the problem.

I think you could also update your current docker installation because the fix is also available on stable.

Excellent!, but now how do I do that because I’m trying to search for the stable version 6.2.x but it doesn’t appear.

What I’m trying to do is clone the docker-compose repo and within the .env file make the version change

VERSION=6.1.0 to 6.2.x?

Or should I do the installation another way?

The current stable version is 6.1.x, the current docker build is always reflecting to stable.

1 Like

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