Skip to content

Define custom fields in Settings - #29321

Merged
rob-ghost merged 6 commits into
mainfrom
feat/custom-field-definitions
Jul 16, 2026
Merged

rob-ghost merged 6 commits into
mainfrom
feat/custom-field-definitions

Conversation

@rob-ghost

@rob-ghost rob-ghost commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

ref BER-3785

The first vertical of membership custom fields: admins can define the fields their publication needs, ahead of collecting values against members. Ships behind the membersCustomFields flag.

What this adds

Admins can create, rename and archive custom fields — short text, long text, and address — in Membership settings, and manage them through the Admin API. Keys are minted from the field name on the server, so a field is referenced by a stable, readable handle. Field names are unique (case-insensitive), so the label is never ambiguous. Archiving is a soft delete that keeps both the key and name reserved forever; rename the archived field to free a name for reuse.

Architecture

The shared catalog is the single source of truth for what a field type is. The frontend layers presentation on top, the backend layers enforcement (validation, key minting, permissions, persistence), and neither re-implements the other's rules.

flowchart TB
    subgraph FE["Frontend (Admin)"]
        Settings["Settings UI<br/>define & manage fields"]
        Presentation["Presentation<br/>labels, icons, inputs"]
    end

    subgraph SHARED["Shared"]
        Catalog["Field Catalog<br/>Field Type → Data Type + validation"]
    end

    subgraph BE["Backend (Ghost Core)"]
        API["Admin API<br/>auth · permissions · flag"]
        Service["Definitions Service<br/>CRUD · minted keys"]
    end

    subgraph DB["Persistence"]
        Table[("Field definitions")]
    end

    Settings --> API --> Service --> Table
    Presentation -.-> Settings
    Catalog -.-> Presentation
    Catalog -.-> Service
Loading

Persistence. One row per field. The type maps through the catalog to a data type (text / json), which picks the value column when value storage lands in the next vertical. Both key and name are unique, and status is the archive flag (soft delete), so neither a key nor a name is ever reused.

erDiagram
    members_custom_fields {
        string id PK
        string key UK
        string name UK
        string type
        string status
    }
Loading

Scope

In: defining fields end to end (Settings + Admin API), every field type including the composite address type.

Out (later verticals): setting and reading values against members, the Member Details entry form, and collection through signup/landing forms, Stripe and import. Address is definable here even though the form to enter one arrives with the Member Details work — field type is an additive dimension by design.

Next entities (staff, posts). Fields live in members_custom_fields now, following the members_* table convention. Supporting another entity later is one migration that generalises the definitions table (add an entity_type, backfill member) plus that entity's value table — not a migration per field. The shared catalog and the service are already entity-agnostic, so only the table name is member-specific today.

How to review

Six atomic commits, each a single concern building on the last:

  1. Relocate two shared row helpers so the new service can reuse them (pure move)
  2. Shared field-type catalog — one source of truth for types and validation, used by both backend and admin
  3. Definitions table (unique key and name, status column for archive) + permissions
  4. Definitions service — keys minted from the name by reading the taken slugs (like tags/labels), a global name-uniqueness invariant, archive as soft delete, column limits derived from the schema
  5. Admin API
  6. Settings UI

Testing

HTTP integration tests drive the definitions API end to end: key minting and collision suffixing (two distinct names deriving the same slug), duplicate-name rejection (globally unique, case-insensitive) plus freeing a name by renaming its archived field, immutable key and type, over-long names, an empty body (400), each field type including address, not-found handling, archive (archived fields leave the list but keep their key and name reserved), the added/edited/archived action log, authorization (a role without the permission is rejected), and the flag off. The full permission role matrix is pinned in the migration test, and acceptance tests cover the Settings UI. Existing suites are unaffected.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This change introduces member custom fields across the stack: a new shared @tryghost/custom-field-types package defines a catalog of field types (short_text, long_text, address) with storage routing and validation schemas. Ghost core adds a members_custom_fields database table/migration, permissions, a CustomFieldsService with CRUD/archive semantics, action logging, admin API endpoints/serializers gated by a membersCustomFields labs flag, and shared case-keys/DbDate utilities (also adopted by gift-links). Admin-x-framework adds typed API hooks, and admin-x-settings adds a feature-flagged UI section, create/edit/archive modal, sidebar navigation, and acceptance/e2e tests. Package versions were bumped.

Possibly related PRs

  • TryGhost/Ghost#28811: Both PRs modify the gift-links snake_case/camelCase key mapping logic, with this PR centralizing the mapper into shared case-keys.ts used by gift-links codec/serializers.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly reflects the main change: adding custom fields in Settings.
Description check ✅ Passed The description is clearly related to the changeset and accurately summarizes the new custom fields feature.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/custom-field-definitions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the migration [pull request] Includes migration for review label Jul 14, 2026
@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

It looks like this PR contains a migration 👀
Here's the checklist for reviewing migrations:

General requirements

  • ⚠️ Tested performance on staging database servers, as performance on local machines is not comparable to a production environment — N/A: new empty table + ~5 permission rows, no data migration
  • Satisfies idempotency requirement (both up() and down())
  • Does not reference models
  • Filename is in the correct format (and correctly ordered)
  • Targets the next minor version
  • All code paths have appropriate log messages
  • Uses the correct utils
  • Contains a minimal changeset
  • Does not mix DDL/DML operations
  • Tested in MySQL and SQLite

Schema changes

  • Both schema change and related migration have been implemented
  • For index changes: has been performance tested for large tables — N/A: only index is the key unique on a new empty table
  • For new tables/columns: fields use the appropriate predefined field lengths
  • For new tables/columns: field names follow the appropriate conventions
  • Does not drop a non-alpha table outside of a major version — N/A: adds a table, does not drop one

Data changes

  • Mass updates/inserts are batched appropriately — N/A: no mass writes (5 permission rows)
  • Does not loop over large tables/datasets — N/A: no data loops
  • Defends against missing or invalid data — N/A: no data transformation
  • For settings updates: follows the appropriate guidelines — N/A: no settings changes

Reviewed for a new-table + permissions migration: achieved items ticked, items not applicable struck through.

@nx-cloud

nx-cloud Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit c24f38c

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 8m 41s View ↗
nx run ghost:test:ci:integration ✅ Succeeded 2m 53s View ↗
nx run ghost:test:integration ✅ Succeeded 2m 55s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-f... ✅ Succeeded 3m 47s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 53s View ↗
nx run @tryghost/koenig-lexical:test:acceptance ✅ Succeeded 2m 23s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 32s View ↗
nx run ghost-admin:test ✅ Succeeded 2m 46s View ↗
Additional runs (9) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-15 19:54:32 UTC

@rob-ghost
rob-ghost force-pushed the feat/custom-field-definitions branch from 564592d to cc21b68 Compare July 14, 2026 17:40

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2

🧹 Nitpick comments (3)
ghost/core/core/server/services/members-custom-fields/service.ts (2)

56-59: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Surface the specific failing property in validation errors. Both validation blocks hardcode property: 'custom_fields' for the error response. You can extract the exact property name from the Zod issue path to provide more actionable feedback to API consumers.

  • ghost/core/core/server/services/members-custom-fields/service.ts#L56-L59: use issue.path[0]?.toString() instead of the hardcoded string in the add method.
  • ghost/core/core/server/services/members-custom-fields/service.ts#L96-L99: use issue.path[0]?.toString() instead of the hardcoded string in the edit method.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ghost/core/core/server/services/members-custom-fields/service.ts` around
lines 56 - 59, Update both validation error blocks in the add and edit methods
of the members custom-fields service to derive the ValidationError property from
the first Zod issue path via issue.path[0]?.toString() instead of hardcoding
custom_fields. Apply this at
ghost/core/core/server/services/members-custom-fields/service.ts lines 56-59 and
96-99.

110-116: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Skip the database update if the name hasn't changed.

If the provided name is identical to the existing name, you can safely skip the database update and the action log record. This prevents unnecessary writes and noisy audit log entries.

♻️ Proposed refactor
-        if (patch.name !== undefined) {
+        if (patch.name !== undefined && patch.name !== existing.name) {
             await this.knex('member_custom_fields')
                 .where('id', id)
                 .update({name: patch.name, updated_at: new Date()});
             await this.recordAction({context, verb: 'rename', subject: id});
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ghost/core/core/server/services/members-custom-fields/service.ts` around
lines 110 - 116, Update the name-handling branch in the custom-field patch
method to first compare patch.name with the existing field name, and only
perform the database update and recordAction rename entry when the value
actually changes. Preserve the current behavior when patch.name is undefined or
different.
ghost/core/core/server/services/members-custom-fields/schema.ts (1)

10-17: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Align schema validation with database constraints.

To catch boundary violations early and return clean validation errors (rather than raw database exceptions), enforce the migration's column lengths directly in the Zod schema.

♻️ Proposed fixes
 export const DbCustomField = z.object({
-    id: z.string(),
-    key: z.string(),
-    name: z.string(),
+    id: z.string().max(24),
+    key: z.string().max(191),
+    name: z.string().max(191),
     type: FieldTypeSchema,
     created_at: DbDate,
     updated_at: DbDate.nullable()
 });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ghost/core/core/server/services/members-custom-fields/schema.ts` around lines
10 - 17, Update the DbCustomField Zod schema to enforce the database migration’s
maximum lengths for the id, key, and name fields, using string length validation
so oversized values fail with clean schema validation errors before database
writes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-54-add-member-custom-fields.js`:
- Around line 7-8: Update CustomFieldsService.insertWithMintedKey so the
slugified base key is truncated to a safe length before collision suffixes are
appended, ensuring generated keys including the maximum suffix remain within the
key column’s 191-character limit. Preserve existing collision resolution and
unique-key behavior for shorter slugs.

In `@ghost/core/core/server/lib/case-keys.ts`:
- Line 21: Update the toCamel function’s replacement regex to match underscores
followed by any alphanumeric character, case-insensitively, so runtime
conversion aligns with SnakeToCamel for keys such as address_1 and uppercase
variants.

---

Nitpick comments:
In `@ghost/core/core/server/services/members-custom-fields/schema.ts`:
- Around line 10-17: Update the DbCustomField Zod schema to enforce the database
migration’s maximum lengths for the id, key, and name fields, using string
length validation so oversized values fail with clean schema validation errors
before database writes.

In `@ghost/core/core/server/services/members-custom-fields/service.ts`:
- Around line 56-59: Update both validation error blocks in the add and edit
methods of the members custom-fields service to derive the ValidationError
property from the first Zod issue path via issue.path[0]?.toString() instead of
hardcoding custom_fields. Apply this at
ghost/core/core/server/services/members-custom-fields/service.ts lines 56-59 and
96-99.
- Around line 110-116: Update the name-handling branch in the custom-field patch
method to first compare patch.name with the existing field name, and only
perform the database update and recordAction rename entry when the value
actually changes. Preserve the current behavior when patch.name is undefined or
different.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d20dedd1-db1c-406c-932a-912255552565

📥 Commits

Reviewing files that changed from the base of the PR and between 6a19084 and cc21b68.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (45)
  • apps/admin-x-framework/package.json
  • apps/admin-x-framework/src/api/member-custom-fields.ts
  • apps/admin-x-settings/src/components/settings/membership/custom-fields.tsx
  • apps/admin-x-settings/src/components/settings/membership/custom-fields/custom-field-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/membership-settings.tsx
  • apps/admin-x-settings/src/components/sidebar.tsx
  • apps/admin-x-settings/test/acceptance/membership/custom-fields.test.ts
  • ghost/admin/package.json
  • ghost/core/core/boot.js
  • ghost/core/core/server/api/endpoints/index.js
  • ghost/core/core/server/api/endpoints/member-custom-fields.ts
  • ghost/core/core/server/api/endpoints/utils/serializers/output/index.js
  • ghost/core/core/server/api/endpoints/utils/serializers/output/member-custom-fields.ts
  • ghost/core/core/server/data/exporter/table-lists.js
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-54-add-member-custom-fields.js
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-56-add-member-custom-fields-permissions.js
  • ghost/core/core/server/data/schema/fixtures/fixtures.json
  • ghost/core/core/server/data/schema/schema.js
  • ghost/core/core/server/lib/case-keys.ts
  • ghost/core/core/server/lib/db-date.ts
  • ghost/core/core/server/services/gift-links/codec.ts
  • ghost/core/core/server/services/gift-links/schema.ts
  • ghost/core/core/server/services/gift-links/serializers.ts
  • ghost/core/core/server/services/members-custom-fields/actions.ts
  • ghost/core/core/server/services/members-custom-fields/codec.ts
  • ghost/core/core/server/services/members-custom-fields/index.ts
  • ghost/core/core/server/services/members-custom-fields/models.ts
  • ghost/core/core/server/services/members-custom-fields/schema.ts
  • ghost/core/core/server/services/members-custom-fields/serializers.ts
  • ghost/core/core/server/services/members-custom-fields/service.ts
  • ghost/core/core/server/web/api/endpoints/admin/routes.js
  • ghost/core/core/shared/labs.js
  • ghost/core/package.json
  • ghost/core/test/e2e-api/admin/member-custom-fields.test.ts
  • ghost/core/test/integration/exporter/exporter.test.js
  • ghost/core/test/unit/server/data/schema/integrity.test.js
  • ghost/core/test/utils/fixtures/fixtures.json
  • packages/custom-field-types/README.md
  • packages/custom-field-types/eslint.config.mjs
  • packages/custom-field-types/package.json
  • packages/custom-field-types/src/index.ts
  • packages/custom-field-types/test/index.test.ts
  • packages/custom-field-types/test/tsconfig.json
  • packages/custom-field-types/tsconfig.json
  • packages/custom-field-types/vitest.config.ts

@coderabbitai coderabbitai Bot left a comment

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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 2

🧹 Nitpick comments (3)
ghost/core/core/server/services/members-custom-fields/service.ts (2)

56-59: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Surface the specific failing property in validation errors. Both validation blocks hardcode property: 'custom_fields' for the error response. You can extract the exact property name from the Zod issue path to provide more actionable feedback to API consumers.

  • ghost/core/core/server/services/members-custom-fields/service.ts#L56-L59: use issue.path[0]?.toString() instead of the hardcoded string in the add method.
  • ghost/core/core/server/services/members-custom-fields/service.ts#L96-L99: use issue.path[0]?.toString() instead of the hardcoded string in the edit method.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ghost/core/core/server/services/members-custom-fields/service.ts` around
lines 56 - 59, Update both validation error blocks in the add and edit methods
of the members custom-fields service to derive the ValidationError property from
the first Zod issue path via issue.path[0]?.toString() instead of hardcoding
custom_fields. Apply this at
ghost/core/core/server/services/members-custom-fields/service.ts lines 56-59 and
96-99.

110-116: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Skip the database update if the name hasn't changed.

If the provided name is identical to the existing name, you can safely skip the database update and the action log record. This prevents unnecessary writes and noisy audit log entries.

♻️ Proposed refactor
-        if (patch.name !== undefined) {
+        if (patch.name !== undefined && patch.name !== existing.name) {
             await this.knex('member_custom_fields')
                 .where('id', id)
                 .update({name: patch.name, updated_at: new Date()});
             await this.recordAction({context, verb: 'rename', subject: id});
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ghost/core/core/server/services/members-custom-fields/service.ts` around
lines 110 - 116, Update the name-handling branch in the custom-field patch
method to first compare patch.name with the existing field name, and only
perform the database update and recordAction rename entry when the value
actually changes. Preserve the current behavior when patch.name is undefined or
different.
ghost/core/core/server/services/members-custom-fields/schema.ts (1)

10-17: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Align schema validation with database constraints.

To catch boundary violations early and return clean validation errors (rather than raw database exceptions), enforce the migration's column lengths directly in the Zod schema.

♻️ Proposed fixes
 export const DbCustomField = z.object({
-    id: z.string(),
-    key: z.string(),
-    name: z.string(),
+    id: z.string().max(24),
+    key: z.string().max(191),
+    name: z.string().max(191),
     type: FieldTypeSchema,
     created_at: DbDate,
     updated_at: DbDate.nullable()
 });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ghost/core/core/server/services/members-custom-fields/schema.ts` around lines
10 - 17, Update the DbCustomField Zod schema to enforce the database migration’s
maximum lengths for the id, key, and name fields, using string length validation
so oversized values fail with clean schema validation errors before database
writes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-54-add-member-custom-fields.js`:
- Around line 7-8: Update CustomFieldsService.insertWithMintedKey so the
slugified base key is truncated to a safe length before collision suffixes are
appended, ensuring generated keys including the maximum suffix remain within the
key column’s 191-character limit. Preserve existing collision resolution and
unique-key behavior for shorter slugs.

In `@ghost/core/core/server/lib/case-keys.ts`:
- Line 21: Update the toCamel function’s replacement regex to match underscores
followed by any alphanumeric character, case-insensitively, so runtime
conversion aligns with SnakeToCamel for keys such as address_1 and uppercase
variants.

---

Nitpick comments:
In `@ghost/core/core/server/services/members-custom-fields/schema.ts`:
- Around line 10-17: Update the DbCustomField Zod schema to enforce the database
migration’s maximum lengths for the id, key, and name fields, using string
length validation so oversized values fail with clean schema validation errors
before database writes.

In `@ghost/core/core/server/services/members-custom-fields/service.ts`:
- Around line 56-59: Update both validation error blocks in the add and edit
methods of the members custom-fields service to derive the ValidationError
property from the first Zod issue path via issue.path[0]?.toString() instead of
hardcoding custom_fields. Apply this at
ghost/core/core/server/services/members-custom-fields/service.ts lines 56-59 and
96-99.
- Around line 110-116: Update the name-handling branch in the custom-field patch
method to first compare patch.name with the existing field name, and only
perform the database update and recordAction rename entry when the value
actually changes. Preserve the current behavior when patch.name is undefined or
different.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d20dedd1-db1c-406c-932a-912255552565

📥 Commits

Reviewing files that changed from the base of the PR and between 6a19084 and cc21b68.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (45)
  • apps/admin-x-framework/package.json
  • apps/admin-x-framework/src/api/member-custom-fields.ts
  • apps/admin-x-settings/src/components/settings/membership/custom-fields.tsx
  • apps/admin-x-settings/src/components/settings/membership/custom-fields/custom-field-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/membership-settings.tsx
  • apps/admin-x-settings/src/components/sidebar.tsx
  • apps/admin-x-settings/test/acceptance/membership/custom-fields.test.ts
  • ghost/admin/package.json
  • ghost/core/core/boot.js
  • ghost/core/core/server/api/endpoints/index.js
  • ghost/core/core/server/api/endpoints/member-custom-fields.ts
  • ghost/core/core/server/api/endpoints/utils/serializers/output/index.js
  • ghost/core/core/server/api/endpoints/utils/serializers/output/member-custom-fields.ts
  • ghost/core/core/server/data/exporter/table-lists.js
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-54-add-member-custom-fields.js
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-56-add-member-custom-fields-permissions.js
  • ghost/core/core/server/data/schema/fixtures/fixtures.json
  • ghost/core/core/server/data/schema/schema.js
  • ghost/core/core/server/lib/case-keys.ts
  • ghost/core/core/server/lib/db-date.ts
  • ghost/core/core/server/services/gift-links/codec.ts
  • ghost/core/core/server/services/gift-links/schema.ts
  • ghost/core/core/server/services/gift-links/serializers.ts
  • ghost/core/core/server/services/members-custom-fields/actions.ts
  • ghost/core/core/server/services/members-custom-fields/codec.ts
  • ghost/core/core/server/services/members-custom-fields/index.ts
  • ghost/core/core/server/services/members-custom-fields/models.ts
  • ghost/core/core/server/services/members-custom-fields/schema.ts
  • ghost/core/core/server/services/members-custom-fields/serializers.ts
  • ghost/core/core/server/services/members-custom-fields/service.ts
  • ghost/core/core/server/web/api/endpoints/admin/routes.js
  • ghost/core/core/shared/labs.js
  • ghost/core/package.json
  • ghost/core/test/e2e-api/admin/member-custom-fields.test.ts
  • ghost/core/test/integration/exporter/exporter.test.js
  • ghost/core/test/unit/server/data/schema/integrity.test.js
  • ghost/core/test/utils/fixtures/fixtures.json
  • packages/custom-field-types/README.md
  • packages/custom-field-types/eslint.config.mjs
  • packages/custom-field-types/package.json
  • packages/custom-field-types/src/index.ts
  • packages/custom-field-types/test/index.test.ts
  • packages/custom-field-types/test/tsconfig.json
  • packages/custom-field-types/tsconfig.json
  • packages/custom-field-types/vitest.config.ts
🛑 Comments failed to post (2)
ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-54-add-member-custom-fields.js (1)

7-8: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Prevent unique key overflow during collision resolution.

The key column has a strict maxlength: 191. In CustomFieldsService.insertWithMintedKey (upstream), a key is minted by slugifying the name and appending a suffix (up to _1000) upon collisions. If the original name (and its resulting slug) is close to 191 characters, appending the suffix will exceed this 191-character limit, resulting in an ER_DATA_TOO_LONG database exception and a 500 server error.

To ensure robustness, ensure the base slug is truncated to a safe length (e.g., 185 characters, leaving room for _1000) before appending the suffix in the upstream service logic.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-54-add-member-custom-fields.js`
around lines 7 - 8, Update CustomFieldsService.insertWithMintedKey so the
slugified base key is truncated to a safe length before collision suffixes are
appended, ensuring generated keys including the maximum suffix remain within the
key column’s 191-character limit. Preserve existing collision resolution and
unique-key behavior for shorter slugs.
ghost/core/core/server/lib/case-keys.ts (1)

21-21: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Mismatch between type mapping and runtime behavior for alphanumeric keys.

The SnakeToCamel TypeScript utility correctly maps keys like "address_1" to "address1" by collapsing the underscore before numbers. However, the runtime toCamel function uses a regex (/_([a-z])/g) that only matches lowercase letters.

Because of this discrepancy, keys containing numbers or uppercase letters remain unmapped at runtime (e.g., "address_1" stays "address_1"), leading to undefined property access errors when your code attempts to access the strongly-typed camelCase keys. Update the regex to case-insensitively match alphanumeric characters to align runtime behavior with the type system.

🐛 Proposed fix for the regex to match alphanumeric characters
-const toCamel = (key: string): string => key.replace(/_([a-z])/g, (_full, letter: string) => letter.toUpperCase());
+const toCamel = (key: string): string => key.replace(/_([a-z0-9])/gi, (_full, char: string) => char.toUpperCase());
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

const toCamel = (key: string): string => key.replace(/_([a-z0-9])/gi, (_full, char: string) => char.toUpperCase());
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ghost/core/core/server/lib/case-keys.ts` at line 21, Update the toCamel
function’s replacement regex to match underscores followed by any alphanumeric
character, case-insensitively, so runtime conversion aligns with SnakeToCamel
for keys such as address_1 and uppercase variants.

@rob-ghost
rob-ghost force-pushed the feat/custom-field-definitions branch 3 times, most recently from c48e2b1 to 38208b2 Compare July 15, 2026 07:59
@codecov

codecov Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.41245% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.10%. Comparing base (2af16d6) to head (2ceab58).

Files with missing lines Patch % Lines
...e/server/services/members-custom-fields/service.ts 88.78% 23 Missing ⚠️
...e/server/services/members-custom-fields/actions.ts 87.50% 6 Missing ⚠️
.../core/server/api/endpoints/member-custom-fields.ts 95.04% 5 Missing ⚠️
ghost/core/core/server/lib/db-date.ts 87.50% 1 Missing ⚠️
...ore/server/services/members-custom-fields/codec.ts 92.30% 1 Missing ⚠️
...re/server/services/members-custom-fields/models.ts 92.30% 1 Missing ⚠️
...re/server/services/members-custom-fields/schema.ts 96.96% 1 Missing ⚠️
...rver/services/members-custom-fields/serializers.ts 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29321      +/-   ##
==========================================
+ Coverage   74.00%   74.10%   +0.09%     
==========================================
  Files        1578     1588      +10     
  Lines      137512   138017     +505     
  Branches    16646    16735      +89     
==========================================
+ Hits       101765   102275     +510     
+ Misses      34729    34692      -37     
- Partials     1018     1050      +32     
Flag Coverage Δ
admin-tests 55.30% <ø> (ø)
e2e-tests 76.19% <92.41%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rob-ghost
rob-ghost force-pushed the feat/custom-field-definitions branch 2 times, most recently from 0172802 to 3769b6e Compare July 15, 2026 11:26
@rob-ghost rob-ghost added the preview Deploy a PR preview environment label Jul 15, 2026
@Ghost-Slimer
Ghost-Slimer temporarily deployed to pr-preview-29321 July 15, 2026 11:59 Destroyed
@rob-ghost
rob-ghost force-pushed the feat/custom-field-definitions branch from 3769b6e to 2f2053c Compare July 15, 2026 12:12
@rob-ghost rob-ghost added preview Deploy a PR preview environment and removed preview Deploy a PR preview environment labels Jul 15, 2026
@Ghost-Slimer
Ghost-Slimer temporarily deployed to pr-preview-29321 July 15, 2026 12:21 Destroyed
@rob-ghost
rob-ghost force-pushed the feat/custom-field-definitions branch from 2f2053c to ece0bfb Compare July 15, 2026 12:41
// Registered before /members/:id so the literal path isn't captured by :id.
router.get('/members/custom_fields', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.browse));
router.post('/members/custom_fields', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.add));
router.get('/members/custom_fields/:key', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.read));
router.get('/members/custom_fields', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.browse));
router.post('/members/custom_fields', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.add));
router.get('/members/custom_fields/:key', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.read));
router.put('/members/custom_fields/:key', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.edit));
router.post('/members/custom_fields', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.add));
router.get('/members/custom_fields/:key', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.read));
router.put('/members/custom_fields/:key', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.edit));
router.delete('/members/custom_fields/:key', mw.authAdminApi, labs.enabledMiddleware('membersCustomFields'), http(api.membersCustomFields.destroy));
@rob-ghost rob-ghost added preview Deploy a PR preview environment and removed preview Deploy a PR preview environment labels Jul 15, 2026
@rob-ghost
rob-ghost force-pushed the feat/custom-field-definitions branch 2 times, most recently from df60f28 to dbc0001 Compare July 15, 2026 13:12
@rob-ghost rob-ghost added the preview Deploy a PR preview environment label Jul 15, 2026
@Ghost-Slimer
Ghost-Slimer temporarily deployed to pr-preview-29321 July 15, 2026 13:20 Destroyed

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/admin-x-settings/src/components/settings/advanced/labs/private-features.tsx`:
- Around line 74-77: Update the description for the “Member custom fields” entry
in the labs feature definitions to describe only creating and managing custom
field definitions, without implying admins can set or read member values.

In `@ghost/core/core/server/services/members-custom-fields/service.ts`:
- Around line 71-74: Update the validation error handling in both add() at
ghost/core/core/server/services/members-custom-fields/service.ts:71-74 and
edit() at
ghost/core/core/server/services/members-custom-fields/service.ts:121-124 to
derive property from the first Zod issue path, using issue.path.join('.') with
'members_custom_fields' as the fallback when empty, instead of hardcoding
'custom_fields'.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7a49c4ea-cb9b-4448-8497-2e91e6d594e3

📥 Commits

Reviewing files that changed from the base of the PR and between cc21b68 and dbc0001.

⛔ Files ignored due to path filters (2)
  • ghost/core/test/e2e-api/admin/__snapshots__/config.test.js.snap is excluded by !**/*.snap
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (44)
  • apps/admin-x-framework/package.json
  • apps/admin-x-framework/src/api/member-custom-fields.ts
  • apps/admin-x-settings/src/components/settings/advanced/labs/private-features.tsx
  • apps/admin-x-settings/src/components/settings/membership/custom-fields.tsx
  • apps/admin-x-settings/src/components/settings/membership/custom-fields/custom-field-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/membership-settings.tsx
  • apps/admin-x-settings/src/components/sidebar.tsx
  • apps/admin-x-settings/test/acceptance/membership/custom-fields.test.ts
  • ghost/admin/app/services/state-bridge.js
  • ghost/admin/package.json
  • ghost/core/core/boot.js
  • ghost/core/core/server/api/endpoints/index.js
  • ghost/core/core/server/api/endpoints/member-custom-fields.ts
  • ghost/core/core/server/api/endpoints/utils/serializers/output/index.js
  • ghost/core/core/server/api/endpoints/utils/serializers/output/member-custom-fields.ts
  • ghost/core/core/server/data/exporter/table-lists.js
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-54-add-members-custom-fields.js
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-56-add-members-custom-fields-permissions.js
  • ghost/core/core/server/data/schema/fixtures/fixtures.json
  • ghost/core/core/server/data/schema/schema.js
  • ghost/core/core/server/services/members-custom-fields/actions.ts
  • ghost/core/core/server/services/members-custom-fields/codec.ts
  • ghost/core/core/server/services/members-custom-fields/index.ts
  • ghost/core/core/server/services/members-custom-fields/models.ts
  • ghost/core/core/server/services/members-custom-fields/schema.ts
  • ghost/core/core/server/services/members-custom-fields/serializers.ts
  • ghost/core/core/server/services/members-custom-fields/service.ts
  • ghost/core/core/server/web/api/endpoints/admin/routes.js
  • ghost/core/core/shared/labs.js
  • ghost/core/package.json
  • ghost/core/test/e2e-api/admin/member-custom-fields.test.ts
  • ghost/core/test/integration/exporter/exporter.test.js
  • ghost/core/test/integration/migrations/migration.test.js
  • ghost/core/test/unit/server/data/schema/fixtures/fixture-manager.test.js
  • ghost/core/test/unit/server/data/schema/integrity.test.js
  • ghost/core/test/utils/fixtures/fixtures.json
  • packages/custom-field-types/README.md
  • packages/custom-field-types/eslint.config.mjs
  • packages/custom-field-types/package.json
  • packages/custom-field-types/src/index.ts
  • packages/custom-field-types/test/index.test.ts
  • packages/custom-field-types/test/tsconfig.json
  • packages/custom-field-types/tsconfig.json
  • packages/custom-field-types/vitest.config.ts
🚧 Files skipped from review as they are similar to previous changes (31)
  • apps/admin-x-framework/package.json
  • ghost/core/test/unit/server/data/schema/integrity.test.js
  • packages/custom-field-types/eslint.config.mjs
  • ghost/core/core/server/data/exporter/table-lists.js
  • packages/custom-field-types/test/tsconfig.json
  • packages/custom-field-types/README.md
  • packages/custom-field-types/vitest.config.ts
  • packages/custom-field-types/test/index.test.ts
  • ghost/core/core/server/services/members-custom-fields/index.ts
  • ghost/core/core/server/services/members-custom-fields/codec.ts
  • ghost/core/test/integration/exporter/exporter.test.js
  • packages/custom-field-types/package.json
  • ghost/core/core/server/data/schema/fixtures/fixtures.json
  • apps/admin-x-settings/src/components/settings/membership/membership-settings.tsx
  • ghost/core/core/server/data/schema/schema.js
  • ghost/core/core/server/services/members-custom-fields/schema.ts
  • apps/admin-x-settings/src/components/settings/membership/custom-fields/custom-field-modal.tsx
  • ghost/core/core/server/services/members-custom-fields/models.ts
  • ghost/core/package.json
  • ghost/core/core/server/api/endpoints/utils/serializers/output/member-custom-fields.ts
  • ghost/core/core/boot.js
  • apps/admin-x-settings/src/components/settings/membership/custom-fields.tsx
  • packages/custom-field-types/tsconfig.json
  • ghost/core/core/server/services/members-custom-fields/actions.ts
  • ghost/core/test/utils/fixtures/fixtures.json
  • packages/custom-field-types/src/index.ts
  • apps/admin-x-settings/src/components/sidebar.tsx
  • apps/admin-x-settings/test/acceptance/membership/custom-fields.test.ts
  • ghost/core/core/server/api/endpoints/index.js
  • apps/admin-x-framework/src/api/member-custom-fields.ts
  • ghost/core/core/server/api/endpoints/member-custom-fields.ts

@rob-ghost
rob-ghost force-pushed the feat/custom-field-definitions branch 3 times, most recently from f42ded8 to 998b15b Compare July 15, 2026 14:47
@rob-ghost rob-ghost added preview Deploy a PR preview environment and removed preview Deploy a PR preview environment labels Jul 15, 2026
@Ghost-Slimer
Ghost-Slimer temporarily deployed to pr-preview-29321 July 15, 2026 15:04 Destroyed
@rob-ghost
rob-ghost force-pushed the feat/custom-field-definitions branch 2 times, most recently from 8a14d17 to c24f38c Compare July 15, 2026 19:25
ref BER-3785

case-keys and the DbDate codec were defined inside gift-links but are generic
row<->domain helpers, not gift-links concerns. Moving them to server/lib lets the
upcoming members-custom-fields service reuse them without depending on gift-links.
Pure move plus import updates; no behaviour change.
ref BER-3785

The single source of truth for the two tier-neutral facts about a custom field
type: which storage type its value routes to, and how a value is validated
(including the composite address type, modelled on Stripe's Address). Ghost core
imports it to enforce validation and route storage; admin imports the same
schemas for form feedback, so the two never drift. Deliberately pure data — no
presentation, no storage codecs, no lookup helpers.
ref BER-3785

The database layer for custom field definitions: a members_custom_fields table
(id, unique key, name, type constrained to the known field types, and a status
column for archive/soft-delete, matching the newsletters pattern) plus browse/
read/add/edit/destroy permissions on the member_custom_field resource.
Administrators and Admin Integrations get full access; Super Editors can browse
and read definitions so they can set values. schema.js, the exporter table list
and both fixture copies match, with the integrity hashes regenerated and the
full permission set pinned in migration.test.js. Member values live in a separate
table added later. Adding the cycle's first migration bumped core and admin to
6.53.0-rc.0.
ref BER-3785

A knex + zod service owning custom field definitions: browse (active only), read,
add, edit and archive. The immutable key is minted from the name by reading the
taken slugs and picking the next free suffix (base, base-2, ...) — the same way
tags and labels generate slugs; the unique index is a race backstop, not the
primary mechanism. Name, key and type are immutable after creation, so a differing
key or type is rejected rather than silently ignored. Delete archives (soft
delete via a status column) so a slug is never reused and values stay attached to
the right definition. Create, rename and archive are recorded to the activity
log. Booted after gift-links; registers the membersCustomFields flag.
ref BER-3785

Exposes the custom field definitions over the Admin API: browse/read/add/edit/
destroy at /members/custom_fields, keyed by the immutable public key (the DB id
is never exposed), registered before /members/:id so the literal path isn't
captured, and gated by the membersCustomFields flag. Permissions are checked
explicitly against the member_custom_field object type (there's no Bookshelf
model). HTTP integration tests cover key minting, collision suffixing, duplicate
names, immutable key/type, over-long names, an empty body, archive (archived
fields leave the list but keep their slug reserved), the added/edited/archived
action log, each field type end to end, not-found handling, authorization, that
id is never leaked, and the flag off.
ref BER-3785

A Custom fields section in Membership settings (and its sidebar nav entry), both
gated by the membersCustomFields feature flag, where admins list, create, rename
and archive field definitions. Fields are addressed by their key — the API never
exposes the DB id. The type picker offers every field type including address and
opens with a fixed menu position so it isn't clipped by the modal. admin-x-
framework gains a presentation-only catalog (label, icon, input control) over the
shared field types; the create form sends just a name and type since the backend
mints the key. A Labs private-features toggle enables the flag, and the Ember
state bridge maps the new response type (React-only, no Ember model). Acceptance
tests cover the flag gating, listing, create, the duplicate-name guard, rename
and archive.
@rob-ghost
rob-ghost force-pushed the feat/custom-field-definitions branch from c24f38c to 2ceab58 Compare July 15, 2026 19:43
@rob-ghost
rob-ghost marked this pull request as ready for review July 15, 2026 19:55

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
apps/admin-x-framework/src/api/member-custom-fields.ts (1)

66-69: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Rename the hook to comply with React rules of hooks.

The createQueryWithId factory returns a custom React hook. However, the name getMemberCustomField does not start with use. Renaming it to useGetMemberCustomField (or useMemberCustomField) ensures that the eslint-plugin-react-hooks linter will correctly enforce the rules of hooks when it is used downstream.

♻️ Proposed refactor
-export const getMemberCustomField = createQueryWithId<MemberCustomFieldsResponseType>({
+export const useGetMemberCustomField = createQueryWithId<MemberCustomFieldsResponseType>({
     dataType,
     path: key => `/members/custom_fields/${key}/`
 });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/admin-x-framework/src/api/member-custom-fields.ts` around lines 66 - 69,
Rename the exported createQueryWithId hook from getMemberCustomField to
useGetMemberCustomField (or useMemberCustomField), and update all downstream
references to the new use-prefixed name.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@apps/admin-x-framework/src/api/member-custom-fields.ts`:
- Around line 66-69: Rename the exported createQueryWithId hook from
getMemberCustomField to useGetMemberCustomField (or useMemberCustomField), and
update all downstream references to the new use-prefixed name.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0cecad88-bd90-4cbb-805d-f126ac8b2fa7

📥 Commits

Reviewing files that changed from the base of the PR and between dbc0001 and 2ceab58.

📒 Files selected for processing (33)
  • apps/admin-x-framework/package.json
  • apps/admin-x-framework/src/api/member-custom-fields.ts
  • apps/admin-x-settings/src/components/settings/advanced/labs/private-features.tsx
  • apps/admin-x-settings/src/components/settings/membership/custom-fields.tsx
  • apps/admin-x-settings/src/components/settings/membership/custom-fields/custom-field-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/membership-settings.tsx
  • apps/admin-x-settings/src/components/sidebar.tsx
  • apps/admin-x-settings/test/acceptance/membership/custom-fields.test.ts
  • ghost/admin/app/services/state-bridge.js
  • ghost/admin/package.json
  • ghost/core/core/boot.js
  • ghost/core/core/server/api/endpoints/index.js
  • ghost/core/core/server/api/endpoints/member-custom-fields.ts
  • ghost/core/core/server/api/endpoints/utils/serializers/output/index.js
  • ghost/core/core/server/api/endpoints/utils/serializers/output/member-custom-fields.ts
  • ghost/core/core/server/data/exporter/table-lists.js
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-54-add-members-custom-fields.js
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-56-add-members-custom-fields-permissions.js
  • ghost/core/core/server/data/schema/fixtures/fixtures.json
  • ghost/core/core/server/data/schema/schema.js
  • ghost/core/core/server/lib/case-keys.ts
  • ghost/core/core/server/lib/db-date.ts
  • ghost/core/core/server/services/gift-links/codec.ts
  • ghost/core/core/server/services/gift-links/schema.ts
  • ghost/core/core/server/services/gift-links/serializers.ts
  • ghost/core/core/server/services/members-custom-fields/actions.ts
  • ghost/core/core/server/services/members-custom-fields/codec.ts
  • ghost/core/core/server/services/members-custom-fields/index.ts
  • ghost/core/core/server/services/members-custom-fields/models.ts
  • ghost/core/core/server/services/members-custom-fields/schema.ts
  • ghost/core/core/server/services/members-custom-fields/serializers.ts
  • ghost/core/core/server/services/members-custom-fields/service.ts
  • ghost/core/core/server/web/api/endpoints/admin/routes.js
🚧 Files skipped from review as they are similar to previous changes (23)
  • ghost/core/core/server/data/exporter/table-lists.js
  • ghost/core/core/server/api/endpoints/utils/serializers/output/index.js
  • ghost/core/core/server/lib/db-date.ts
  • apps/admin-x-framework/package.json
  • ghost/core/core/server/services/members-custom-fields/codec.ts
  • ghost/admin/package.json
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-54-add-members-custom-fields.js
  • ghost/admin/app/services/state-bridge.js
  • ghost/core/core/server/services/gift-links/codec.ts
  • ghost/core/core/server/api/endpoints/utils/serializers/output/member-custom-fields.ts
  • ghost/core/core/server/services/members-custom-fields/index.ts
  • ghost/core/core/server/data/migrations/versions/6.53/2026-07-14-16-47-56-add-members-custom-fields-permissions.js
  • ghost/core/core/server/lib/case-keys.ts
  • apps/admin-x-settings/src/components/settings/membership/membership-settings.tsx
  • ghost/core/core/server/services/members-custom-fields/actions.ts
  • apps/admin-x-settings/src/components/settings/advanced/labs/private-features.tsx
  • apps/admin-x-settings/src/components/settings/membership/custom-fields.tsx
  • ghost/core/core/boot.js
  • ghost/core/core/server/api/endpoints/member-custom-fields.ts
  • ghost/core/core/server/data/schema/schema.js
  • ghost/core/core/server/services/members-custom-fields/serializers.ts
  • ghost/core/core/server/data/schema/fixtures/fixtures.json
  • ghost/core/core/server/services/members-custom-fields/schema.ts

@rob-ghost
rob-ghost merged commit 3df1cbc into main Jul 16, 2026
50 of 51 checks passed
@rob-ghost
rob-ghost deleted the feat/custom-field-definitions branch July 16, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

migration [pull request] Includes migration for review preview Deploy a PR preview environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants