OTRS migration to Zammad does not work with user-created Priority

Infos:

  • Used Zammad version: 5.3.0-1669364938.83ce4433.focal
  • Installation method (source, package, …): Package
  • Operating system: Ubuntu Server 20.4
  • Database + version: postgresql-12
  • Elasticsearch version:elasticsearch/stable,now 7.17.7
  • Browser + version: Google Chrome 107.0.5304.107

OTRS 6 Version
6.0.3
Znuny4OTRS-Repo
6.0.76
Znuny4OTRS-ZammadMigrator
6.0.7

Expected behavior:

Importing OTRS 6 DATA into fresh Zammad Instance finishes withour error messages

Actual behavior:

Migration stops when it reaches priority that was created by end user with error code

/opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in exec_params': PG::ForeignKeyViolation: ERROR: insert or update on table "ticket_priorities" violates foreign key constraint "fk_rails_7ba453ab6d" (ActiveRecord::InvalidForeignKey) DETAIL: Key (created_by_id)=(43) is not present in table "users". /opt/zammad/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql_adapter.rb:672:in exec_params’: ERROR: insert or update on table “ticket_priorities” violates foreign key constraint “fk_rails_7ba453ab6d” (PG::ForeignKeyViolation)
DETAIL: Key (created_by_id)=(43) is not present in table “users”.

Steps to reproduce the behavior:

Create priority in OTRS 6 with user that is not root@localhost.
Start Migration in fresh Zammad instance

We have since edited the CREATED_BY value in the ticket_priority table but have not had any success doing so.
a SELECT FROM responds with all fields being 1’s but the import from Zammad still claims that user 43 has created the policy

Output from:
SELECT * FROM ticket_priority
|ID|NAME|VALID_ID|CREATE_TIME|CREATE_BY|CHANGE_TIME|CHANGE_BY|
|1|1 very low|1|2010-12-20 18:22:15|1|2022-11-26 16:55:07|1|
|2|2 low|1|2010-12-20 18:22:15|1|2022-11-26 16:55:14|1|
|3|3 normal|1|2010-12-20 18:22:15|1|2022-11-26 16:55:19|1|
|4|4 high|1|2010-12-20 18:22:15|1|2022-11-26 16:55:25|1|
|5|5 very high|1|2010-12-20 18:22:15|1|2022-11-26 16:55:32|1|
|6|6 very very low|1|2014-04-15 14:27:24|1|2022-11-26 22:06:32|1|
|7|migration|1|2022-11-26 16:47:54|1|2022-11-26 16:47:54|1|

Editing the CREATED_BY ID DID solve the issue.
There was some time involved to wait.

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