[FEATURE]: Import custom fields for members #338

Open
opened 2026-01-07 14:01:05 +01:00 by carla · 0 comments
Owner

Description

Support importing custom field values from CSV columns. Custom fields should exist in Mila before import for best results.

Important Requirements:

  • Custom fields should be created in Mila first - Unknown custom field columns will be ignored with a warning message
  • CSV headers for custom fields must match the custom field name exactly (same normalization as member fields applies)
  • Custom field values are validated according to the custom field type (string, integer, boolean, date, email)
  • Unknown custom field columns (non-existent names) will be ignored with a warning - import continues

Tasks:

  • Extend header_mapper.ex to detect custom field columns by name (using same normalization as member fields)
  • Query existing custom fields during prepare/2 to map custom field columns
  • Collect unknown custom field columns and add warning messages (don't fail import)
  • Map custom field CSV values to CustomFieldValue creation in process_chunk/3
  • Handle custom field type validation (string, integer, boolean, date, email)
  • Create CustomFieldValue records linked to members during import
  • Update error messages to include custom field validation errors
  • Add UI help text explaining custom field requirements:
    • "Custom fields must be created in Mila before importing"
    • "Use the custom field name as the CSV column header (same normalization as member fields)"
    • Link to custom fields management section
  • Update CSV templates documentation to explain custom field columns
  • Add tests for custom field import (valid, invalid name, type validation, warning for unknown)

Acceptance criteria

  • Custom field columns are recognized by name (with normalization)
  • Warning messages shown for unknown custom field columns (import continues)
  • Custom field values are created and linked to members
  • Type validation works for all custom field types
  • UI clearly explains custom field requirements
  • Tests cover custom field import scenarios (including warning for unknown names)

External or internal Dependencies

#334

## Description Support importing custom field values from CSV columns. Custom fields should exist in Mila before import for best results. **Important Requirements:** - **Custom fields should be created in Mila first** - Unknown custom field columns will be ignored with a warning message - CSV headers for custom fields must match the custom field **name** exactly (same normalization as member fields applies) - Custom field values are validated according to the custom field type (string, integer, boolean, date, email) - Unknown custom field columns (non-existent names) will be ignored with a warning - import continues **Tasks:** - [ ] Extend `header_mapper.ex` to detect custom field columns by name (using same normalization as member fields) - [ ] Query existing custom fields during `prepare/2` to map custom field columns - [ ] Collect unknown custom field columns and add warning messages (don't fail import) - [ ] Map custom field CSV values to `CustomFieldValue` creation in `process_chunk/3` - [ ] Handle custom field type validation (string, integer, boolean, date, email) - [ ] Create `CustomFieldValue` records linked to members during import - [ ] Update error messages to include custom field validation errors - [ ] Add UI help text explaining custom field requirements: - "Custom fields must be created in Mila before importing" - "Use the custom field name as the CSV column header (same normalization as member fields)" - Link to custom fields management section - [ ] Update CSV templates documentation to explain custom field columns - [ ] Add tests for custom field import (valid, invalid name, type validation, warning for unknown) ## Acceptance criteria - [ ] Custom field columns are recognized by name (with normalization) - [ ] Warning messages shown for unknown custom field columns (import continues) - [ ] Custom field values are created and linked to members - [ ] Type validation works for all custom field types - [ ] UI clearly explains custom field requirements - [ ] Tests cover custom field import scenarios (including warning for unknown names) ## External or internal Dependencies #334
carla added this to the I can import members milestone 2026-01-07 14:01:05 +01:00
carla added the
M
label 2026-01-07 14:01:05 +01:00
carla added a new dependency 2026-01-07 14:01:51 +01:00
carla added this to the Sprint 11: 08.01-29.01 project 2026-01-08 12:53:24 +01:00
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Depends on
Reference: local-it/mitgliederverwaltung#338
No description provided.