OTRS migration - Validation failed

@MrGeneration: Thank you very much for the support. It was indeed the dynamic field which comes after the pre_proc_emergency_telephone field.
After resolving some additional (minor) Problems we managed to import the OTRS data to our new Zammad instance.

For those, interested in additional information:
In our OTRS instance there were two causal field-types causing the ActiveRecord::RecordInvalid (Validation failed: Data option must have integer for :maxlength) error. The field-type of both dynamic fields (PreProcRepresentationBy and PreProcVacationInfo) was set as textfield. Deleting (only) these two dynamic fields resolved this error.

Note: The remaining dynamic “Text” fields that were set as text were imported seamlessly.

After fixing the error with the dynamic fields, an additional Error occurred during the Zammad import.

thread#-: loading State…

    …

    1: from lib/import/otrs/state.rb:65:in `state_type_id'

NoMethodError (undefined method `id’ for nil:NilClass)

After looking at the following Zammad Issue

I followed the Advice from @thorsteneckel, migrated all affected Tickets (Using the OTRS –> Admin –> GenericAgent –> New Job –> selecting Tickets –> Status) to a predefined state and afterwards deleting all custom State-Types

OTRS –> Admin –> State Management –> select custom state –>

  1. Validity –> invalid –> safe
  2. State type –> removed –> safe (a predefined state)

Following this adjustment, the Zammad import completed without further errors.

The full zammad cli log (FQDN, Key and organization were replaced):

irb(main):001:0>
irb(main):002:0> Import::OTRS.start
thread#-: Start import…
thread#-: POST: https://internFQDN/otrs/public.pl?Action=ZammadMigrator
thread#-: PARAMS: {:Action=>“ZammadMigrator”, :Key=>“KEY”}
thread#-: loading SysConfig…
thread#-: POST: https://internFQDN/otrs/public.pl?Action=ZammadMigrator
thread#-: PARAMS: {:Subaction=>“Export”, :Object=>“SysConfig”, :Limit=>“”, :Offset=>“”, :Diff=>0, :Action=>“ZammadMigrator”, :Key=>“KEY”}
Setting.reset_change_id: set new cache, 3d11535f-3050-4220-b0a7-b916bd327151
Setting.set(‘http_type’, “https”)
Setting.reset_change_id: set new cache, e80b4a4c-5ef3-49fc-ac0c-6701b7b9b5e1
Setting.set(‘organization’, “BNC Netcare”)
Setting.reset_change_id: set new cache, fe64dd81-5629-492e-b3a2-a53dd3b28603
Setting.set(‘system_id’, “35”)
Setting.reset_change_id: set new cache, ab4d4576-b1d5-4ec3-97f2-53a54486dc6a
Setting.set(‘ticket_hook’, “Ticket#”)
Setting.reset_change_id: set new cache, 96b7790d-b436-4ec4-b6de-eba5025dfd1c
Setting.set(‘ticket_number’, “Ticket::Number::Date”)
Setting.reset_change_id: set new cache, affcdb47-dcc0-4c35-8c56-29963e84e586
Setting.set(‘ticket_number_date’, {:checksum=>true})
thread#-: loading DynamicField…
thread#-: POST: https://internFQDN/otrs/public.pl?Action=ZammadMigrator
thread#-: PARAMS: {:Subaction=>“Export”, :Object=>“DynamicField”, :Limit=>“”, :Offset=>“”, :Diff=>0, :Action=>“ZammadMigrator”, :Key=>“KEY”}
thread#-: loading State…
thread#-: POST: https://internFQDN/otrs/public.pl?Action=ZammadMigrator
thread#-: PARAMS: {:Subaction=>“Export”, :Object=>“State”, :Limit=>“”, :Offset=>“”, :Diff=>0, :Action=>“ZammadMigrator”, :Key=>“KEY”}
thread#-: update Ticket::State.find_by(id: 1)
thread#-: add Ticket::State.find_by(id: 10)
Traceback (most recent call last):
16: from lib/import/otrs.rb:148:in updateable_objects' 15: from lib/import/otrs.rb:58:in import’
14: from lib/import/otrs.rb:134:in import_action' 13: from lib/import/transaction_factory.rb:11:in import’
12: from lib/import/transaction_factory.rb:12:in block in import' 11: from lib/import/base_factory.rb:9:in import_action’
10: from lib/import/otrs/state_factory.rb:24:in import_loop' 9: from lib/import/base_factory.rb:40:in import_loop’
8: from lib/import/base_factory.rb:40:in each' 7: from lib/import/base_factory.rb:12:in block in import_action’
6: from lib/import/base_factory.rb:36:in create_instance' 5: from lib/import/base_factory.rb:36:in new’
4: from lib/import/otrs/state.rb:21:in initialize' 3: from lib/import/otrs/state.rb:27:in import’
2: from lib/import/otrs/state.rb:58:in map' 1: from lib/import/otrs/state.rb:65:in state_type_id’
NoMethodError (undefined method `id’ for nil:NilClass)
irb(main):003:0>

Thank you for your help and perfect support not only in solving this problem, but also for your efforts and technical support in this community.