Skip to content

fix(all-users): read legacy programId formats#776

Merged
ismaeldosil merged 1 commit intostagingfrom
fix/legacy-programid-format
Jan 27, 2026
Merged

fix(all-users): read legacy programId formats#776
ismaeldosil merged 1 commit intostagingfrom
fix/legacy-programid-format

Conversation

@ismaeldosil
Copy link
Collaborator

@ismaeldosil ismaeldosil commented Jan 27, 2026

Summary

  • Add fallback logic to read program data from multiple user field formats
  • Fixes program display for 55 users with legacy programId string format
  • Also handles legacy program field (could be name or ID)

Changes

Modified getAllUsers() in Firebase.tsx to check formats in priority order:

  1. programs array (current format) - 44 users
  2. programId string (legacy format) - 55 users ← now fixed
  3. program field (legacy name or ID)

Test plan

  • All Users dashboard shows program names for legacy users
  • Search by program name works
  • CSV export includes program names

Add fallback logic to read program data from multiple field formats:
- Priority 1: programs array (current format)
- Priority 2: programId string (legacy format - 55 users)
- Priority 3: program field (legacy name or ID)

This fixes program display for users with legacy data structures.

Closes CHALK-080
@ismaeldosil ismaeldosil merged commit 4ffb473 into staging Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant