-
-
Notifications
You must be signed in to change notification settings - Fork 202
Fix: RecordFactory mapping logic not triggering for missing source keys #8936
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingcoreCore framework functionalityCore framework functionality
Description
This task fixes a bug in Neo.data.RecordFactory where model fields using the mapping configuration are not populated if the field name itself is missing from the input data object.
The Issue
Currently, setRecordFields iterates over Object.entries(fields) (the input data). If a field like y2025 relies on a mapping years.2025, but y2025 is not in the input data, setRecordFields never processes it, and the mapping logic inside parseRecordValue is never triggered.
The Fix
Modify Neo.data.RecordFactory.assignDefaultValues to also handle mapped fields.
- Iterate over the model's fields.
- If a field has a
mappingand the field key is missing in the data object:- Explicitly set
data[fieldName] = undefined(or the default value).
- Explicitly set
- This ensures that
setRecordFieldswill visit the field, triggeringparseRecordValue, which then correctly resolves the mapping from the source data.
Acceptance Criteria
- Fields with
mappingare correctly populated even if their key is missing in the source data. - The DevRank grid correctly displays data for the mapped yearly columns.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcoreCore framework functionalityCore framework functionality