Skip to content

WIP: Spec for versioned field list bug - refs #665#1031

Draft
philayres wants to merge 1 commit intoconsected:developfrom
hmsrc:versioned-field-list-665
Draft

WIP: Spec for versioned field list bug - refs #665#1031
philayres wants to merge 1 commit intoconsected:developfrom
hmsrc:versioned-field-list-665

Conversation

@philayres
Copy link
Copy Markdown
Contributor

WIP: Versioned field list spec for issue #665

Status: Work in Progress — awaiting a concrete reproduction scenario from the reporter.

What this PR contains

A spec file (spec/models/dynamic/versioned_field_list_spec.rb) that tests whether versioned dynamic model definitions correctly restrict fields to those that existed at the time a record was created.

Tests cover

  • field_list_array on versioned definitions excludes new fields
  • option_type_config fields on versioned definitions excludes new fields
  • edit_form_field_list for old instances excludes new fields
  • TemplateOptionMapping.dynamic_model_mapping item_list excludes new fields

Current findings

All 4 tests pass at the model layer, meaning the core versioning of field_list works correctly when an explicit field_list is set. The bug likely manifests in a different scenario (e.g. blank field_list auto-detected from table columns, or in the rendering/template layer).

Next steps

  • Clarify the exact reproduction scenario from the issue reporter
  • Write additional tests covering the specific failing case
  • Implement the fix

Refs #665

@philayres philayres force-pushed the versioned-field-list-665 branch from 0f98b4c to aa7eec5 Compare April 4, 2026 11:32
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