You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the field controls for content type fields to match what was selected in the UI.
Actual Behavior
Field controls are assigned to fields in alphabetical order based on the order the fields were defined in. Running an incorrectly generated migration results in a broken content type.
functionmigrationFunction(migration,context){consttestType=migration.createContentType("testType");testType.displayField("cField").name("TestType").description("")consttestTypeAField=testType.createField("aField");testTypeAField.name("A - Field").type("Integer").localized(false).required(false).validations([]).disabled(false).omitted(false)consttestTypeCField=testType.createField("cField");testTypeCField.name("C - Field").type("Symbol").localized(false).required(false).validations([]).disabled(false).omitted(false)consttestTypeBField=testType.createField("bField");testTypeBField.name("B - Field").type("Date").localized(false).required(false).validations([]).disabled(false).omitted(false)testType.changeFieldControl("aField","builtin","numberEditor"// aField is first alphabetically so correctly gets the numberEditortestType.changeFieldControl("cField","builtin","datePicker")// cField is third alphabetically so incorrectly gets the datePicker from the third field defined (bField)testType.changeFieldControl("bField","builtin","singleLine")// bField is second alphabetically so incorrectly gets the singleLine from the second field defined (cField)}module.exports=migrationFunction;
Possible Solution
Steps to Reproduce
Create a model with field names that aren't alphabetical i.e. A - Field, C - Field, B - Field.
Choose different field types for each field to demonstrate the issue
Generate a migration script with contentful merge export
See that the changeFieldControl function calls are incorrect.
Context
I'm new to the CLI but this doesn't give me much confidence in the tooling.
Environment
Language Version: v18.16.1
Package Manager Version: 9.5.1
Browser Version: n/a
Operating System: MacOS 13.4.1
Package Version: 2.6.30
The text was updated successfully, but these errors were encountered:
Expected Behavior
When creating a migration script with:
contentful merge export
...or through the Merge app UI...
I expect the field controls for content type fields to match what was selected in the UI.
Actual Behavior
Field controls are assigned to fields in alphabetical order based on the order the fields were defined in. Running an incorrectly generated migration results in a broken content type.
Possible Solution
Steps to Reproduce
A - Field, C - Field, B - Field
.contentful merge export
changeFieldControl
function calls are incorrect.Context
I'm new to the CLI but this doesn't give me much confidence in the tooling.
Environment
The text was updated successfully, but these errors were encountered: