Skip to content

fix(schema): declare WorkflowDefinition version createdBy as a user reference #18207

Description

Sub-issue of #18201.

The user merge cannot discover this field from the schema, so it is declared by hand in USER_MERGE_SCALAR_COMPLEMENTS (src/modules/userMerge/userMerge-scalarRules.ts). One declaration, three entries: the same version mapping is reachable under published_version, draft_version and all_versions.

Current declarationsrc/modules/workflow/storage/workflow-definition-entity.ts:10

{ name: 'createdBy', label: 'Created by', type: 'string', format: 'short', mandatoryType: 'no', editDefault: false, multiple: false, upsert: true, isFilterable: false },

What is missing: declared with format: 'short' and, being a nested mapping child, without entityTypes.

Expected: declare it as a user reference, i.e. format: 'id' with entityTypes: [ENTITY_TYPE_USER].

Done when: the declaration is fixed, all three entries are removed from USER_MERGE_SCALAR_COMPLEMENTS, and tests/01-unit/modules/userMerge/userMerge-schemaDiscovery-test.ts passes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugType: something isn't working (fix:).

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions