Skip to content

fix(intake-forms): show all formFields in list page, not just deprecated requiredFields - #30782

Closed
anuj-kumary wants to merge 4 commits into
open-metadata:1.13from
anuj-kumary:1.13-intake-table
Closed

anuj-kumary wants to merge 4 commits into
open-metadata:1.13from
anuj-kumary:1.13-intake-table

Conversation

@anuj-kumary

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

Copy link
Copy Markdown
Member

Why

The Playwright test at e2e/Pages/IntakeForm.spec.ts was failing because the list page only displayed fields from requiredFields (the deprecated compatibility view), but the test expected all three formFields to be visible in the DOM — including the two optional ones.

Root cause

IntakeFormsPage.tsx was:

  1. Only requesting owners,requiredFields from the API (no formFields)
  2. Iterating record.requiredFields ?? [] which only contains fields where required: true

The test creates a form with 3 formFields (1 required, 2 optional) and asserts all three show as extension.<propertyName> in the table. Only 1 was rendered → assertion on index 1 failed → entire serial suite cascaded.

Fix

  • Request formFields alongside requiredFields: fields: 'owners,formFields,requiredFields'
  • Render using getIntakeFormFields(record) (already in IntakeFormUtils.ts) which prefers formFields and falls back to the deprecated requiredFields for backward compat
  • Rename the column from label.required-fields → label.field-plural to reflect that all included fields (required and optional) are shown

The collate-ui vendored copy already had this correct implementation; this PR ports it back to the OSS source.

Test plan

  • IntakeForm.spec.ts E2E suite passes — all three extension.<propertyName> badges render in the list row
  • Creating/editing an intake form with optional fields still shows them in the list with "(optional)" label
  • Toggling enabled and delete flows unaffected

Summary by Gitar

  • Intake forms & tables:
    • Fixed intake form list page to request and display all formFields rather than only deprecated requiredFields
    • Fixed table custom-property serialization and validation for {columns, rows} structure
    • Fixed single entity reference serialization when unwrapping array values from user/team pickers

This will update automatically on new commits.

Greptile Summary

The PR expands the intake-form list to display current form fields, corrects custom-property table and entity-reference serialization, and adjusts intake-form editor layout and validation.

  • Requests and renders formFields while retaining the deprecated requiredFields fallback.
  • Preserves table columns named id by allowing index-keyed grid rows without an injected identifier.
  • Serializes table values in {columns, rows} form and unwraps single entity-reference picker arrays.
  • Adds end-to-end coverage for domain intake-form custom properties.

Confidence Score: 4/5

The production changes appear safe to merge, with a non-blocking test-isolation issue in the new Playwright suite.

The runtime changes align field retrieval and serialization with their actual API and widget shapes; the remaining concern is that the new test broadly deletes unrelated domain intake-form state.

Files Needing Attention: openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/IntakeFormCustomPropertyFields.spec.ts

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormsPage.tsx Fetches and renders effective form fields so optional fields appear while legacy requiredFields records remain supported.
openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx Avoids synthetic table row IDs, preserves the structured table value, and updates required-field presentation.
openmetadata-ui/src/main/resources/ui/src/hooks/useGridEditController.ts Makes synthetic row-ID insertion configurable without changing the controller's index-based editing behavior.
openmetadata-ui/src/main/resources/ui/src/utils/CustomProperty.utils.ts Recognizes structured table values and correctly unwraps array-shaped values from single-reference pickers.
openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormDesignerModal.tsx Constrains the designer content to an independently scrolling panel with a stable footer.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/IntakeFormCustomPropertyFields.spec.ts Adds broad serialization coverage, but its cleanup can delete domain intake forms owned by other fixtures or tests.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Form[Intake form fields] --> Domain[Domain creation form]
  Domain --> Widgets[Custom-property widgets]
  Widgets --> Serialize[serializeExtensionValue]
  Serialize --> Payload[Domain extension payload]
  Payload --> API[Domain REST API]
  ListAPI[Intake forms API] --> Effective[getIntakeFormFields]
  Effective --> List[Intake forms list badges]
Loading

Reviews (1): Last reviewed commit: "fix(intake-forms): show all formFields i..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Context used:

@anuj-kumary
anuj-kumary requested a review from a team as a code owner August 1, 2026 05:23
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary self-assigned this Aug 1, 2026
…ted requiredFields

IntakeFormsPage was fetching and rendering `requiredFields` (the deprecated
compatibility view) instead of the canonical `formFields` array. This caused
the Playwright test to fail because it expected all three included fields
(two optional, one required) to be visible in the table — but only the single
required field was rendered.

Switch to `getIntakeFormFields(record)` which prefers `formFields` and falls
back to `requiredFields` for backwards compatibility. Also request
`formFields` in the API call alongside `requiredFields` so the data is present.
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary closed this Aug 1, 2026
Comment on lines +43 to +48
}
const list = await listRes.json();
const forms = (list.data ?? []) as Array<{ id: string; entityType: string }>;
for (const form of forms) {
if (form.entityType === entityType) {
await api.delete(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Cleanup deletes unrelated intake forms

If the test environment already contains a domain intake form created by another fixture or suite, ensureNoIntakeForm hard-deletes it during both setup and teardown, causing order-dependent failures and lost shared test configuration. Cleanup should track and remove only the resource owned by this test.

Comment on lines +275 to 289
{getIntakeFormFields(record).length === 0 ? (
<Typography className="tw:text-tertiary" size="text-sm">
{t('label.none')}
</Typography>
) : (
(record.requiredFields ?? []).map((rf) => (
getIntakeFormFields(record).map((field) => (
<Badge
color={
rf.fieldKind === FieldKind.CustomProperty
field.fieldKind === FieldKind.CustomProperty
? 'gray'
: 'brand'
}
key={rf.fieldPath}
key={field.fieldPath}
size="sm"
type="pill-color">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Quality: Column header still labeled 'Required Fields' but shows all fields

The column cell now renders every field via getIntakeFormFields(record) (required and optional), but the column header on line 187 still uses t('label.required-fields') ("Required Fields"), which is misleading to users. The PR description states the intent to rename this to label.field-plural; the change appears to have been reverted/omitted in this commit. Update the header key to label.field-plural (or another neutral label) so it accurately reflects that optional fields are shown too.

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 0 resolved / 2 findings

Updates the intake form list page to request and display all formFields rather than only deprecated requiredFields, accompanied by new Playwright coverage. Consider updating the column header label from 'Required Fields' to better reflect that all fields are now shown.

💡 Edge Case: Required timeInterval no longer validates the 'end' value

📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx:704-718

The 'end' Form.Item lost its required rule while 'start' kept it, so a required timeInterval custom property now passes validation with only start filled. serializeTimeInterval happily emits { start } with no end, letting an incomplete interval be submitted. If both ends are meant to be mandatory for a required field, restore the required rule on the end inner Form.Item to match start.

Re-apply the required rule to the 'end' field so a required interval needs both bounds.
<Form.Item
  name={[...namePath, 'end']}
  noStyle
  rules={
    isRequired
      ? [{ required: true, message: requiredMessage }]
      : []
  }>
💡 Quality: Column header still labeled 'Required Fields' but shows all fields

📄 openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormsPage.tsx:187 📄 openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormsPage.tsx:275-289

The column cell now renders every field via getIntakeFormFields(record) (required and optional), but the column header on line 187 still uses t('label.required-fields') ("Required Fields"), which is misleading to users. The PR description states the intent to rename this to label.field-plural; the change appears to have been reverted/omitted in this commit. Update the header key to label.field-plural (or another neutral label) so it accurately reflects that optional fields are shown too.

🤖 Prompt for agents
Code Review: Updates the intake form list page to request and display all formFields rather than only deprecated requiredFields, accompanied by new Playwright coverage. Consider updating the column header label from 'Required Fields' to better reflect that all fields are now shown.

1. 💡 Edge Case: Required timeInterval no longer validates the 'end' value
   Files: openmetadata-ui/src/main/resources/ui/src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx:704-718

   The 'end' Form.Item lost its `required` rule while 'start' kept it, so a required timeInterval custom property now passes validation with only `start` filled. serializeTimeInterval happily emits `{ start }` with no `end`, letting an incomplete interval be submitted. If both ends are meant to be mandatory for a required field, restore the required rule on the `end` inner Form.Item to match `start`.

   Fix (Re-apply the required rule to the 'end' field so a required interval needs both bounds.):
   <Form.Item
     name={[...namePath, 'end']}
     noStyle
     rules={
       isRequired
         ? [{ required: true, message: requiredMessage }]
         : []
     }>

2. 💡 Quality: Column header still labeled 'Required Fields' but shows all fields
   Files: openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormsPage.tsx:187, openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormsPage.tsx:275-289

   The column cell now renders every field via getIntakeFormFields(record) (required and optional), but the column header on line 187 still uses t('label.required-fields') ("Required Fields"), which is misleading to users. The PR description states the intent to rename this to label.field-plural; the change appears to have been reverted/omitted in this commit. Update the header key to label.field-plural (or another neutral label) so it accurately reflects that optional fields are shown too.

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

UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant