Files
521bf4864b [MM-69328] Preserve option ranks across property field type changes (#37143) (#37264)
* [MM-69328] Preserve option ranks across property field type changes

Non-rank property fields no longer strip rank values from their options,
so converting a field rank -> select -> rank keeps the original ordering.
On conversion into rank, arbitrary option ranks (missing, duplicated, or
non-sequential) are renumbered to a clean, gap-free 1..N sequence that
preserves relative order. Directly authoring a rank field still requires
valid ranks, and that validation now runs on every rank path as the single
source of truth so invalid rank data is never persisted.

* [MM-69328] Preserve values across select<->rank type changes

select and rank store values in the same format (a single option-ID
string), so TypeChangeValueCleanupHook now skips cleanup when
transitioning between the two types.

* [MM-69328] Construct fresh opts per subtest in cleanup hook test

Shared opts were mutated in place by sanitizeAndValidateOptions during
field creation, so the second subtest was seeing the already-processed
canonical form instead of the original input.

---------

(cherry picked from commit 77cba352e8)

Co-authored-by: David Krauser <[email protected]>

Co-authored-by: Hanzo Dev <[email protected]>
2026-06-26 15:21:51 +00:00
..