Allow customising the way sequence keys are generated

Created on 7 May 2022, almost 3 years ago
Updated 26 October 2023, over 1 year ago

Problem/Motivation

When you have 2 stacked splits both with the same config and the config does not have any UUIDs then the config of the lowest priority split overwrites that of any higher priority split instead of merging the 2.

The problem is that the key of the sequence dos not correctly identify the element. For elements that have a uuid field we use that but this doesn't work in a generic way.

Steps to reproduce

Split congif in 2 stackable split that as no UUID

Proposed resolution

In ConfigPatchMerge we check the config schema to see if there is an index callback specified and use that to generate the index when transforming the sequence indexes.

Modules can alter the config schema to specify this callable. This is probably much more efficient than dispatching events or call alter hooks. But it is a new extension mechanism not many developers are familiar with. Maybe some profiling could be good.

Remaining tasks

  • Create patch
  • Test patch
  • Anything else?

User interface changes

none

API changes

API addition: a new config schema property is checked on sequences.

Data model changes

none

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom jollysolutions

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024