Skip to content

Fix table and entity reference value updation issue - #30781

Merged
anuj-kumary merged 3 commits into
1.13from
1.13-intake-table
Aug 1, 2026
Merged

anuj-kumary merged 3 commits into
1.13from
1.13-intake-table

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

The issue was introduced because of an incorrect cherry-pick during merge conflict resolution.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • Bug Fixes:
    • Fixed table and entity reference extension property value updates by properly unwrapping array-wrapped entity references and validating table row shapes in CustomProperty.utils.ts.
    • Removed injected id key from table editor and updated row filtering logic to prevent clobbering user-defined columns.
    • Updated IntakeFormDesignerModal layout structure and styling for improved stability.
  • Tests:
    • Added comprehensive unit tests in CustomProperty.utils.test.ts covering table and entity reference serialization as well as row validation logic.
    • Added playwright end-to-end tests for intake form custom property fields in IntakeFormCustomPropertyFields.spec.ts.

This will update automatically on new commits.

Greptile Summary

This PR fixes serialization of table and single entity-reference custom properties in domain intake forms while preserving user-defined id columns.

  • Adds an optional grid row-ID key and disables synthetic IDs for the domain custom-property table editor.
  • Corrects populated-table detection and unwraps array-shaped single entity references.
  • Improves required-field presentation, intake-form modal layout, and end-to-end/unit coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported synthetic row-ID leak is fixed on the affected domain intake-form path.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx Removes synthetic table row IDs, preserves configured id values, filters blank rows during form serialization, and improves required-field rendering.
openmetadata-ui/src/main/resources/ui/src/hooks/useGridEditController.ts Adds configurable row-ID generation while retaining the existing default for other grid consumers.
openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.ts Corrects table-shape validation and single entity-reference serialization.
openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.test.ts Adds focused coverage for table, entity-reference, scalar, and structured custom-property serialization.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/IntakeFormCustomPropertyFields.spec.ts Adds end-to-end coverage for required custom properties and their submitted extension payload.
openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormDesignerModal.tsx Constricts the slideout layout and makes its content independently scrollable without introducing a blocking failure.

Reviews (2): Last reviewed commit: "nit" | Re-trigger Greptile

Context used:

@anuj-kumary anuj-kumary self-assigned this Aug 1, 2026
@anuj-kumary anuj-kumary added the UI UI specific issues label Aug 1, 2026
@anuj-kumary
anuj-kumary requested a review from a team as a code owner August 1, 2026 04:36
@anuj-kumary anuj-kumary added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

❌ UI Checkstyle Failed

❌ ESLint + Prettier + Organise Imports (src)

One or more source files have linting or formatting issues.

❌ Playwright - ESLint + Prettier + Organise Imports

One or more Playwright test files have linting or formatting issues.

Affected files
  • openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/IntakeFormCustomPropertyFields.spec.ts

❌ Tailwind Audit

Hardcoded Tailwind values found. Use a design-system utility (run yarn tw-audit:report for the token each value maps to).

❌ Antd + Less Deprecation Guard

A new antd import or new .less file was added. Use UntitledUI + Tailwind for new work.

Affected files

at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {


Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 64%
64.19% (62314/97072) 44.61% (33427/74931) 47.43% (10230/21566)

@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

@anuj-kumary
anuj-kumary merged commit 59507c1 into 1.13 Aug 1, 2026
59 of 61 checks passed
@anuj-kumary
anuj-kumary deleted the 1.13-intake-table branch August 1, 2026 05:40
@gitar-bot

gitar-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Fixes table and entity reference value updates by correcting serialization shapes and unwrapping array references. Addresses the synthetic row ID leak by ensuring clean row filtering.

✅ 1 resolved
✅ Bug: rowIdKey:null passed to hook that ignores it; injected id leaks into saved rows

📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx:437-439 📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx:447-452
CoreTableEditor passes rowIdKey: null to useGridEditController, but that hook's parameter type is the inline literal { dataSource, setDataSource, columns } with no rowIdKey field (grep finds rowIdKey only at this one call site). Passing it as an object-literal argument triggers a TypeScript excess-property error (build-breaking). Worse, the hook's handleAddRow still hardcodes return [...data, { id: data.length + '' }], so every newly added row gets an id field — and because this PR removed the .map((row) => omit(row, 'id')) step from the emit effect, that spurious id now leaks into the serialized table value ({columns, rows}) that gets persisted. A blank newly-added row { id: '0' } even passes the Object.values(row).some(Boolean) filter. Fix: either add real rowIdKey support to useGridEditController (and have handleAddRow honor it), or drop rowIdKey: null here and restore id-stripping in the emit effect.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source

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

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants