fix-labelled-attribute-lov
🐛 Bug Fixes
Labelled attribute LOV restored for IP Magic Box
Goal: Manual attributes edited via neo/Retool with { value, label } LOV entries must render as list selects in IP Magic Box (e.g. Bulgari Product Type).
Solution: Accept mixed LOV storage in the Attribute schema and normalize to string[] in GET /api/user before returning folder attributes.
Features:
- Attributes with legacy
string[]LOV keep working unchanged - Attributes with labelled
{ value, label }[]LOV are exposed again to clients
Implementation Details:
- Mongoose
lov: [String]dropped labelled entries on populate, leavinglovundefined and forcing a free-text input in IP Magic Box
Files Modified:
app/database/schema/company.js- Store attribute LOV asSchema.Types.Mixedapp/util/attributeLov.js- Normalize legacy strings and labelled entries to canonical valuesapp/services/users.js- Apply LOV normalization ingetByJobIdPullCompany