zammad / zammad

Zammad is a web based open source helpdesk/customer support system

Home Page:https://zammad.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OTRS import: When importing queues with a parent queue to Zammad the migration then stops

MarkusHeld opened this issue · comments

Used Zammad Version

6.2

Environment

  • Installation method: any
  • Operating system: any
  • Database + version: any
  • Plugin: Znuny4OTRS-ZammadMigrator-6.0.7.opm

Actual behaviour

If a queue with a parent queue is created in Znuny the name of the queue looks like "IT::Hardware" with two colons in it. Now the import to Zammad stops with the following error

/opt/zammad/app/models/group.rb:53:in `guess_name_last_and_parent': Validation failed: Name contains invalid path (ActiveRecord::RecordInvalid)
        from /opt/zammad/app/models/group.rb:68:in `ensure_name_last_and_parent'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:400:in `block in make_lambda'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:199:in `block (2 levels) in halting'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:687:in `block (2 levels) in default_terminator'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:686:in `catch'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:686:in `block in default_terminator'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:200:in `block in halting'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:595:in `block in invoke_before'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:595:in `each'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:595:in `invoke_before'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:106:in `run_callbacks'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/callbacks.rb:929:in `_run_validation_callbacks'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.8.1/lib/active_model/validations/callbacks.rb:115:in `run_validations!'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activemodel-7.0.8.1/lib/active_model/validations.rb:337:in `valid?'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/validations.rb:68:in `valid?'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/validations.rb:84:in `perform_validations'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/validations.rb:47:in `save'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/transactions.rb:298:in `block in save'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.8.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/transactions.rb:298:in `save'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.8.1/lib/active_record/suppressor.rb:50:in `save'
        from /opt/zammad/lib/import/otrs/queue.rb:48:in `create'
        from /opt/zammad/lib/import/otrs/queue.rb:32:in `create_or_update'
        from /opt/zammad/lib/import/otrs/queue.rb:26:in `import'
        from /opt/zammad/lib/import/otrs/queue.rb:20:in `initialize'
        from /opt/zammad/lib/import/base_factory.rb:36:in `new'
        from /opt/zammad/lib/import/base_factory.rb:36:in `create_instance'
        from /opt/zammad/lib/import/base_factory.rb:12:in `block in import_action'
        from /opt/zammad/lib/import/base_factory.rb:40:in `each'
        from /opt/zammad/lib/import/base_factory.rb:40:in `import_loop'
        from /opt/zammad/lib/import/base_factory.rb:9:in `import_action'
        from /opt/zammad/lib/import/otrs.rb:134:in `import_action'
        from /opt/zammad/lib/import/otrs.rb:58:in `import'
        from /opt/zammad/lib/import/otrs.rb:150:in `updateable_objects'
        from /opt/zammad/lib/import/otrs.rb:28:in `start'
        from /home/zammad/import.rb:9:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands/runner/runner_command.rb:43:in `load'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands/runner/runner_command.rb:43:in `perform'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/command/base.rb:87:in `perform'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/command.rb:48:in `invoke'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.1/lib/rails/commands.rb:18:in `<main>'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /opt/zammad/bin/rails:5:in `<main>'

Expected behaviour

The import does not crash and a group with a parent group is created in Zammad.

Steps to reproduce the behaviour

  • Create a Queue like IT in Znuny
  • Create a Queue with Subqueue IT in Znuny
  • Import the data from Znuny to Zammad

Support Ticket

Ticket#10153039

I'm sure this is a bug and no feature request or a general question.

yes