[Studio] Include non-default result types in the autofill suggestion pool#636
Merged
Conversation
The suggestion pool only contained class attributes of the default request (DEFAULT and NUMERIC types) plus the result types of already existing mapping rows — on a fresh configuration without mapping rows, select, relation, asset or date fields never showed up as suggestions although the same class offered them in configs with existing mappings. The loader now always fetches a fixed set of transformation result types for the suggestion pool, each suggestion carries the result type its attribute came from (default wins when an attribute is offered by several), and applying a suggestion creates the mapping row with that result type instead of hardcoding 'default'. Fixes #622
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Changes in this pull request
Resolves #622
The autofill suggestion pool only contained class attributes returned by the default attribute request (DEFAULT and NUMERIC transformation result types) plus the result types of already existing mapping rows. On a fresh configuration without mapping rows, select, relation, asset or date fields therefore never appeared as suggestions — while the same class showed them in configurations whose existing mappings had already pulled those result types into the attribute map (e.g. the demo car-import vs. a new config on the same class, as described in the issue).
array,boolean,date,quantityValue,asset,assetArray,gallery,dataObject,dataObjectArray)default— without this, accepting e.g. a relation field suggestion would produce a broken mapping rowAdditional info
How to test: create a new import configuration for the demo CAR class with the car-export JSON source — the autofill suggestions must now include e.g.
colorandcategories; applying them creates rows with the matching transformation result type. Rows created for relation targets may still need transformation operators for the actual import — the fix is about the suggestions and the row's result type.