Skip to content

fix: prevent custom field identity collisions - #152

Open
ArtwoXYZ wants to merge 1 commit into
Kyonew:mainfrom
ArtwoXYZ:codex/issue-151-custom-field-identity
Open

ArtwoXYZ wants to merge 1 commit into
Kyonew:mainfrom
ArtwoXYZ:codex/issue-151-custom-field-identity

Conversation

@ArtwoXYZ

@ArtwoXYZ ArtwoXYZ commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Custom fields now use stable, server-generated IDs instead of names based on their labels.

This prevents a plugin update from accidentally creating a built-in field with the same technical name as an existing custom field.

Existing fields and values are migrated automatically on startup and after restoring a backup. Card and corner-field settings are migrated too.

Related issue

Part of #151

Type of change

  • 🐛 Bug fix
  • ✨ New feature
  • 🧩 New or updated plugin
  • 📖 Documentation
  • 🌍 Translation
  • 🧹 Refactor or chore

Checklist

  • make typecheck passes
  • I tested my changes locally
  • I updated the docs or translations if needed
  • My change is focused on a single thing

Screenshots

No visible UI change in this PR. The existing custom-field screens keep working as before.

Anything else?

This is the first of two PRs planned for #151.

The migration is safe to run more than once. It never overwrites an existing destination value and keeps the old values as recovery data.

Tested with:

  • unit and MongoDB integration tests
  • a real Docker startup migration
  • instance and collection backup restores
  • JSON and ZIP export/restore round trips
  • editing and saving native and custom fields independently
  • a manual visual check

A second PR will add the warning and conflict-resolution UI.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant