Skip to main content
Version: 1.7.1

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, leaving lov undefined and forcing a free-text input in IP Magic Box

Files Modified:

  • app/database/schema/company.js - Store attribute LOV as Schema.Types.Mixed
  • app/util/attributeLov.js - Normalize legacy strings and labelled entries to canonical values
  • app/services/users.js - Apply LOV normalization in getByJobIdPullCompany