Skip to content

fix(intake-forms): render all formFields in the 1.13 list page (unblocks 44 AUT cases) - #30785

Closed
ShaileshParmar11 wants to merge 2 commits into
1.13from
fix/intake-forms-list-all-formfields-113
Closed

ShaileshParmar11 wants to merge 2 commits into
1.13from
fix/intake-forms-list-all-formfields-113

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

IntakeForm.spec.ts fails deterministically on both 1.13 AUT runs (MySQL and PostgreSQL), 3/3 attempts:

expect(locator).toBeVisible() failed
Locator: getByText('extension.pwAudienceString8f4da1c6')
Error: element(s) not found  (15000ms)
  at IntakeForm.spec.ts:389  -- test.step('New row renders in the list')

The suite is describe.serial, so one assertion takes out the whole file: 1 failed + 21 skipped per database — 44 cases across the two 1.13 runs. It is the single largest source of non-executed tests in the current AUT reports.

Root cause

The 1.13 list page requests only owners,requiredFields and iterates record.requiredFields, which is the deprecated required-only compatibility view. The test creates a form with three formFields (one required) and asserts all three render as extension.<propertyName>. Only the required one is rendered, so the loop fails on the second.

The backend confirms only one field can ever appear there — IntakeFormUtil.toRequiredFields():

return listOrEmpty(formFields).stream()
    .filter(field -> Boolean.TRUE.equals(field.getRequired()))

And the test's own preceding assertions — expect(body.formFields).toHaveLength(3) and expect(body.requiredFields).toHaveLength(1) — pass. So the API is correct and the defect is confined to the list page.

Why this is missing on 1.13 specifically

The hunk was in the original 1.13 port b387b7f83b, was lost when that commit was reverted by 320c061881, and is absent from both follow-ups that re-landed the work — #30724 (backend) and #30726 (UI). It fell through the split.

$ git log 320c061881..origin/1.13 -- .../IntakeForms/IntakeFormsPage.tsx
(no output — never restored)

It was also written as #30782 and closed unmerged. This is the third attempt; 2.0 and main have had the fix since #30614.

Fix

  • Request formFields alongside requiredFields so the preferred view is available.
  • Render through the existing getIntakeFormFields(record) helper, which prefers formFields and falls back to the deprecated requiredFields — so pre-migration rows still render.
  • Rename the column from label.required-fields to label.field-plural, since all included fields are now shown.

Both prerequisites already exist on 1.13 — getIntakeFormFields in IntakeFormUtils.ts:25 (landed via #30726) and "field-plural" in en-us.json:880 — so this is self-contained.

The patched file is now byte-identical to IntakeFormsPage.tsx on main, so there is no partial-port drift.

Type of change:

  • Bug fix

Tests:

Not executed against a running 1.13 stack — I don't have one, so this is not empirically demonstrated end to end. Stating that plainly rather than implying otherwise.

What was checked:

  • The patched file is byte-identical to IntakeFormsPage.tsx on main (diff clean), so there is no partial-port drift.
  • Project ESLint: clean.
  • tsc before/after on the same config: identical error profile, and this version reports fewer errors than the baseline. No new error class is introduced.
  • Both prerequisites confirmed present on 1.13: getIntakeFormFields (IntakeFormUtils.ts:25) and "field-plural" (en-us.json:880).

The decisive check for a reviewer with a 1.13 stack: run IntakeForm.spec.ts. The failure is deterministic (3/3 attempts on both databases), so one green run settles it — the list row should render three extension.<propertyName> badges instead of one, and the 21 downstream tests in the serial suite should execute instead of being skipped.

Backward compatibility is covered by the helper's fallback — a form with only the legacy requiredFields populated still renders, marked required.

Note: Validate PR Metadata will be red for want of a linked issue. It is not a required status check; link one or apply skip-pr-checks if you want it green.

🤖 Generated with Claude Code

Greptile Summary

This fix updates the intake-form list to retrieve and render every form field while retaining compatibility with legacy required-only records.

  • Requests formFields in addition to owners and deprecated requiredFields.
  • Uses getIntakeFormFields to prefer the current representation and fall back to legacy data.
  • Renames the column to “Fields” and labels each field as required or optional.

Confidence Score: 5/5

The PR appears safe to merge, with the expanded field rendering aligned with the backend response and compatibility helper contracts.

The list API supports the requested formFields projection, and the selected helper correctly renders current fields while converting legacy requiredFields entries into required form fields.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/pages/IntakeForms/IntakeFormsPage.tsx Correctly expands list rendering to all form fields while preserving the legacy requiredFields fallback.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Page[Intake forms list] -->|Request owners, formFields, requiredFields| API[Intake forms API]
  API --> Record[IntakeForm record]
  Record --> Helper[getIntakeFormFields]
  Helper -->|formFields present| Current[Use all current fields]
  Helper -->|legacy requiredFields only| Legacy[Convert entries to required fields]
  Current --> Badges[Render field badges]
  Legacy --> Badges
Loading

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

Context used:

The intake-forms list page on 1.13 requests only `owners,requiredFields`
and iterates `record.requiredFields` -- the deprecated required-only
compatibility view. IntakeForm.spec.ts creates a form with three
formFields (one required) and asserts all three render, so only one
badge appears and the assertion fails. The suite is describe.serial, so
this takes out the whole file: 1 failed + 21 skipped per database,
44 cases across the two 1.13 AUT runs.

The backend confirms only one field can ever appear here:
IntakeFormUtil.toRequiredFields() filters on
Boolean.TRUE.equals(field.getRequired()). The test's own preceding
assertions -- formFields length 3, requiredFields length 1 -- pass,
which pins the mechanism to the list page rather than the API.

This hunk was part of the original 1.13 port b387b7f, was lost when
that commit was reverted by 320c061, and is absent from both
follow-ups: #30724 (backend) and #30726 (UI). It has never been
restored -- `git log 320c061..origin/1.13 -- IntakeFormsPage.tsx`
is empty.

Request formFields alongside requiredFields, render through the
existing getIntakeFormFields() helper (which prefers formFields and
falls back to the deprecated view), and rename the column to reflect
that all included fields are shown. Both prerequisites are already on
1.13: getIntakeFormFields in IntakeFormUtils.ts and label.field-plural
in en-us.json.

The patched file is now byte-identical to the same file on main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner August 1, 2026 08:15
@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 safe to test Add this label to run secure Github workflows on PRs UI UI specific issues 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.

❌ 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/74925) 47.43% (10230/21566)

@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

@ShaileshParmar11
ShaileshParmar11 marked this pull request as draft August 1, 2026 09:00
@ShaileshParmar11

Copy link
Copy Markdown
Contributor Author

no longer needed

@gitar-bot

gitar-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Updates the 1.13 intake forms list page to request and render all form fields using the existing helper, resolving deterministic test failures on both MySQL and PostgreSQL. No issues found.

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants