Dataprivacy delete job with error PG::StringDataRightTruncation: FEHLER: Wert zu lang für Typ character varying(8000)

Infos:

  • Used Zammad version: 4.0.x
  • Used Zammad installation type: centos package
  • Operating system: centos 7.9
  • Browser + version: Chrome

Expected behavior:

  • removing a user (agent) via ‘Dataprivacy’ option and change all corresponding tickets to system user.

Actual behavior:

  • error: ERROR – : PG::StringDataRightTruncation: FEHLER: Wert zu lang für Typ character varying(8000)
    : INSERT INTO “data_privacy_tasks” (“deletable_type”, “deletable_id”, “preferences”, “updated_by_id”, “created_by_id”, “created_at”, “updated_at”) VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING “id” (ActiveRecord::ValueTooLong)
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in async_exec' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in block (2 levels) in exec_no_cache’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies/interlock.rb:48:in block in permit_concurrent_loads' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/concurrency/share_lock.rb:187:in yield_shares’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies/interlock.rb:47:in permit_concurrent_loads' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/postgresql_adapter.rb:610:in block in exec_no_cache’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract_adapter.rb:581:in block (2 levels) in log' /opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in mon_synchronize’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract_adapter.rb:580:in block in log' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/notifications/instrumenter.rb:23:in instrument’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract_adapter.rb:571:in log' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/postgresql_adapter.rb:609:in exec_no_cache’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in execute_and_clear' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:81:in exec_query’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract/database_statements.rb:130:in exec_insert' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:115:in exec_insert’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/composite_primary_keys-11.2.0/lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb:6:in insert' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract/query_cache.rb:21:in insert’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/persistence.rb:187:in _insert_record' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/composite_primary_keys-11.2.0/lib/composite_primary_keys/persistence.rb:64:in _create_record’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/counter_cache.rb:184:in _create_record' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/locking/optimistic.rb:70:in _create_record’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/attribute_methods/dirty.rb:140:in _create_record' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/callbacks.rb:346:in block in _create_record’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:132:in run_callbacks' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:816:in _run_create_callbacks’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/callbacks.rb:346:in _create_record' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/timestamp.rb:102:in _create_record’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/persistence.rb:705:in create_or_update' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/callbacks.rb:342:in block in create_or_update’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:132:in run_callbacks' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:816:in _run_save_callbacks’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/callbacks.rb:342:in create_or_update' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/persistence.rb:308:in save!’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/validations.rb:52:in save!' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/transactions.rb:315:in block in save!’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/transactions.rb:387:in block in with_transaction_returning_status' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in block in transaction’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract/transaction.rb:239:in block in within_new_transaction' /opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in mon_synchronize’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract/transaction.rb:236:in within_new_transaction' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in transaction’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/transactions.rb:212:in transaction' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/transactions.rb:385:in with_transaction_returning_status’
    /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/transactions.rb:315:in save!' /opt/zammad/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.4.6/lib/active_record/suppressor.rb:48:in save!’
    /opt/zammad/app/controllers/application_controller/renders_models.rb:19:in model_create_render' /opt/zammad/app/controllers/data_privacy_tasks_controller.rb:15:in create’

Steps to reproduce the behavior:

  • create new dataprivacy - delete job. select User. This user has 0 customer-tickets and 1693 owner-tickets. Start job with keyword “LÖSCHEN”