Skip to content

[$175] Workspace Members - Error message does not match the actual field name when importing CSV #103066

Open

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.2-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/53678195/test-cases/41237937
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Windows 11 / Chrome, Android 16 / Samsung Galaxy A06
App Component: Workspace Settings

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Workspace > Members
  3. Have some members added to workspace
  4. Click on the "More" and select "Download CSV"
  5. Click on the "More" and select "Import spreadsheet"
  6. Use the CSV file from the previous step
  7. Try mapping "forward to" twice and click Import
  8. Do the same with "approval limit" and "Over Limit Forward To"

Expected Result:

The error message displays the exact names of column that is mapped twice

Actual Result:

"approveTo", "reportThreshold", or "approveToAlternate", is displayed in the error message, when the field is mapped twice not matching the actual display name.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7277669_1791198163047.Recording__435.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7277669

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @jasperhuangg

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 5, 2026
  2. applause-bot commented on Oct 5, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/3498bcefa4f80b2e26dfd5de0791eaaf68a3df9cd9feb32fe8b177ca4c7139d7

  3. MelvinBot commented on Oct 5, 2026

    @MelvinBot
    Contributor

    Proposal

    When you map one field to two columns in the Members spreadsheet import, the error shows the internal column key (for example, approveTo, reportThreshold, approveToAlternate) instead of the label you see (for example, "Forward to", "Approval limit", "Over limit forward to").

    What is the root cause of that problem?

    ImportedMembersPage passes the raw duplicate value from findDuplicate(columns) straight into the spreadsheet.singleFieldMultipleColumns error. That value is a CONST.CSV_IMPORT_COLUMNS key, not the translated label. The Categories, Per Diem, Merchant Rules, and Wallet importers instead look up the matching columnRoles entry and pass its .text.

    Code references

    What changes do you think we should make in order to solve the problem?

    In ImportedMembersPage, find the columnRoles entry whose value equals the duplicate, and pass its text to spreadsheet.singleFieldMultipleColumns. This matches the Categories importer. It also fixes the other Members fields (for example, submitTo, customField1) and works in every language, since text is already translated.

    Apply the same change to ImportedTagsPage, which has the same bug.

    What alternative solutions did you explore? (Optional)

    Move the lookup into a shared helper in importSpreadsheetUtils that returns the duplicate role's label. All six importers could then use it, so this bug can't come back in a new importer.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/103066) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 5, 2026
  5. melvin-bot commented on Oct 5, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External)

  6. changed the title [-]Workspace Members - Error message does not match the actual field name when importing CSV[/-] [+][$175] Workspace Members - Error message does not match the actual field name when importing CSV[/+] on Oct 5, 2026
  7. melvin-bot commented on Oct 5, 2026

    @melvin-bot
  8. camesenin commented on Oct 5, 2026

    @camesenin
  9. melvin-bot commented on Oct 5, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  10. franklincg commented on Oct 5, 2026

    @franklincg

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When importing workspace members from a CSV/spreadsheet, if two spreadsheet columns are mapped to the same member field, the duplicate-field validation message shows the internal field key (for example approveTo, reportThreshold, or approveToAlternate) instead of the localized label shown to the user (for example “Forward to”, “Approval limit”, or “Over limit forward to”).

    What is the root cause of that problem?

    In ImportedMembersPage, the duplicate field is detected with findDuplicate(columns). That function returns the selected role value, which is an internal CONST.CSV_IMPORT_COLUMNS key.

    The page currently passes that raw value directly into:

    translate('spreadsheet.singleFieldMultipleColumns', duplicate)

    so the translation interpolates the internal identifier instead of the user-facing label.

    The page already has the required localized labels in columnRoles, where each role contains both the internal value and translated text.

    Other spreadsheet importers already resolve the duplicate back to its role and pass duplicateColumn.text, which is the correct pattern.

    The same raw-key pattern is also present in ImportedTagsPage, so it is susceptible to the same class of error.

    What changes do you think we should make in order to solve the problem?

    1. In ImportedMembersPage, after calling findDuplicate(columns), find the corresponding role in columnRoles:

      • match role.value === duplicate
      • pass duplicateColumn.text to spreadsheet.singleFieldMultipleColumns
    2. Apply the same fix in ImportedTagsPage so both import flows consistently display localized field names.

    3. Add regression coverage for the Members importer that maps two columns to the same role and verifies:

      • the rendered error contains the translated label, e.g. “Forward to”
      • the rendered error does not contain the raw key, e.g. approveTo

    This keeps the fix aligned with the existing Categories / Per Diem / Merchant Rules importer pattern and automatically supports all translated member field labels, including custom fields.

    What alternative solutions did you explore? (Optional)

    A shared helper in importSpreadsheetUtils could centralize “duplicate role value -> display label” resolution for all importers. That would reduce duplication, but for this bug I would keep the change small and follow the existing importer pattern locally in Members and Tags.

  11. melvin-bot commented on Oct 8, 2026

    @melvin-bot

    @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  12. 16 remaining items

  13. melvin-bot commented on Nov 4, 2026

    @melvin-bot

    @parasharrajat Huh... This is 4 days overdue. Who can take care of this?

  14. melvin-bot commented on Nov 5, 2026

    @melvin-bot

    @parasharrajat Still overdue 6 days?! Let's take care of this!

  15. melvin-bot commented on Nov 5, 2026

    @melvin-bot

    @parasharrajat 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  16. jeffrey-graham commented on Nov 7, 2026

    @jeffrey-graham
  17. melvin-bot commented on Nov 7, 2026

    @melvin-bot
  18. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    @parasharrajat 10 days overdue. Is anyone even seeing these? Hello?

  19. melvin-bot commented on Nov 11, 2026

    @melvin-bot

    @parasharrajat 12 days overdue now... This issue's end is nigh!

  20. parasharrajat commented on Nov 14, 2026

    @parasharrajat
    Member

    @MelvinBot Implement this proposal #103066 (comment) and create the shared helper.

    🎀 👀 🎀 C+ reviewed

  21. melvin-bot commented on Nov 14, 2026

    @melvin-bot

    Triggered auto assignment to @jasperhuangg, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  22. MelvinBot commented on Nov 14, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ❌ fail

    Browser verification was blocked because the supported driver cannot download/upload CSV files. This is a tooling limitation, not an observed App failure.

    App Home screen before blocked CSV testing

    Step Status
    Members: duplicate Forward to, Approval limit, and Over limit forward toNot executed: CSV download/upload unsupported.
    ❌
    Tags: duplicate GL codeNot executed: CSV upload unsupported.
    ❌
    Company cards: duplicate DateNot executed: CSV upload unsupported.
    ❌
    Session readinessSigned in; Home screen confirmed.
    App Home screen before blocked CSV testing
    ✅

    Implemented the proposal and shared helper across seven importers in Show localized field labels in duplicate spreadsheet mapping errors, a draft assigned to parasharrajat.

    Automated checks: 87 targeted tests passed, plus lint, typecheck, spelling, explicit React Compiler checks, formatting, and Storybook smoke testing. Full-suite runs timed out; remaining verification limitations are documented in the PR.


    view run · no recording available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions