github →

New request

#13211: Partial LINK field update corrupts data

We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.

Issue
prio: low

Introduction

When directly hitting the API could be only sent a single field of the composite field The current implementation does not take this into account resulting to invalid update

Tech input

We should not force cast things as null or defined as they are optional We should handle each fallback, retrieve the existing row and spread the update into the existing value to be passed to the transformation. Handling new exceptions such as conflicting inputs

export const transformLinksValue = (
  value: LinksFieldGraphQLInput,
): LinksFieldGraphQLInput => {
  if (!isDefined(value)) {
    return value;
  }

  const primaryLinkUrlRaw = value.primaryLinkUrl as string | null;
  const primaryLinkLabelRaw = value.primaryLinkLabel as string | null;
  const secondaryLinksRaw = value.secondaryLinks as string | null;
// ...
Assessmentadvisory
bug●● medium90% confidence

Partial composite LINK updates overwrite unsent sub-fields because the transform lacks a merge-with-existing step.

Likely files
  • packages/twenty-server/src/engine/metadata-modules/flat-field-metadata/utils/transform-links-value.ts
  • packages/twenty-server/src/engine/core-modules/record/record.service.ts
  • packages/twenty-shared/src/types/field-metadata.types.ts
Create the request

This opens a fresh agent run and a draft PR for issue #13211.

Cancel