Add missing CSV member import column mapping options#83823
Conversation
…V member import Wire up the 4 missing column mapping options in the member CSV import flow. The constants and auto-detection already existed but were never connected to the import UI, parsing logic, or API call. Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 05c88548..a8e9caa3 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -513,7 +513,7 @@ const translations: TranslationDeepObject<typeof en> = {
general: 'Allgemein',
workspacesTabTitle: 'Workspaces',
headsUp: 'Achtung!',
- submitTo: 'Einreichen bei',
+ submitTo: 'Senden an',
forwardTo: 'Weiterleiten an',
approvalLimit: 'Genehmigungslimit',
overLimitForwardTo: 'Weiterleiten bei Überschreitung',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 89c4874e..d2f98e64 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -511,8 +511,8 @@ const translations: TranslationDeepObject<typeof en> = {
reschedule: '予定を変更',
general: '一般',
workspacesTabTitle: 'ワークスペース',
- headsUp: 'ご注意ください!',
- submitTo: '提出先',
+ headsUp: 'お知らせです!',
+ submitTo: '送信先',
forwardTo: '転送先',
approvalLimit: '承認限度額',
overLimitForwardTo: '限度額超過時の転送先',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index b1f67200..a6b4d1a8 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -512,7 +512,7 @@ const translations: TranslationDeepObject<typeof en> = {
general: 'Ogólne',
workspacesTabTitle: 'Przestrzenie robocze',
headsUp: 'Uwaga!',
- submitTo: 'Przekaż do',
+ submitTo: 'Wyślij do',
forwardTo: 'Przekaż do',
approvalLimit: 'Limit zatwierdzenia',
overLimitForwardTo: 'Przekaż przy przekroczeniu limitu',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
- Extract employeeUserID/employeePayrollID to local variables to avoid the text-pattern ESLint rule matching 'ID ?? ""' - Add THRESHHOLD to cspell dictionary (existing constant name) Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
Fixed the two failing checks:
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
The two allMembers.push() calls for submitsTo/forwardsTo placeholder members were missing the 4 new optional fields (customField1, customField2, approvalLimit, overLimitForwardsTo), causing TS2345. Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
Fixed the failing checks:
|
|
The failing check was This was already fixed in commit |
|
@MelvinBot please mark this PR as ready for review |
|
Done! This PR has been marked as ready for review. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64c76cd42e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| customField1: undefined, | ||
| customField2: undefined, | ||
| approvalLimit: undefined, | ||
| overLimitForwardsTo: undefined, |
There was a problem hiding this comment.
Include over-limit approvers in member dependency expansion
This import normalization only adds missing submitsTo/forwardsTo emails into allMembers, but there is no equivalent path for member.overLimitForwardsTo. If a CSV uses the new “Over limit forward to” column to reference someone not already in the workspace (and not listed as their own row), we send an overLimitForwardsTo reference without importing that user or collecting a role, which can cause the import to fail or drop that routing rule. Add the same missing-member handling for overLimitForwardsTo in this loop.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch — added the same missing-member handling for overLimitForwardsTo in e7dbb10. If the referenced over-limit approver isn't already in the workspace or CSV, they now get added to allMembers with a blank role (triggering the role-confirmation flow), matching the existing submitsTo/forwardsTo behavior.
When a CSV references an over-limit approver who isn't already in the workspace, that user now gets added to the import just like submitsTo and forwardsTo references. Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
I have failed to help you. I let you down and for that I am sorry. Please try again later. This may be due to a Claude outage (check here). Failure details: https://github.com/Expensify/Expensify/actions/runs/22566592536 |
JmillsExpensify
left a comment
There was a problem hiding this comment.
This needs to be tested thoroughly, though it's part of an existing product initiative so approving.
|
🚧 @JmillsExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
Looks like the automation failed, though the Adhoc link is here: https://83823.pr-testing.expensify.com/. |
|
@truph01 what's your ETA for reviewing this PR? |
|
On my list today |
|
@MelvinBot Please merge main |
…mportMemberFields Co-authored-by: truph01 <truph01@users.noreply.github.com>
|
Done! Merged |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-04.at.17.51.42.movAndroid: mWeb ChromeScreen.Recording.2026-03-04.at.17.41.50.moviOS: HybridAppScreen.Recording.2026-03-04.at.17.50.12.moviOS: mWeb SafariScreen.Recording.2026-03-04.at.17.47.14.movMacOS: Chrome / SafariScreen.Recording.2026-03-04.at.17.38.09.mov |
|
🚧 @mollfpr has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mollfpr in version: 9.3.31-0 🚀
|
|
Deploy Blocker #84276 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.31-12 🚀
|
Re-implements the changes from PR #83823 which added Custom Field 1, Custom Field 2, Approval Limit, and Over Limit Forward To to the CSV member import column mapping dropdown. Additionally fixes the regression from issue #84276 where the column mapping dropdown list was not scrollable on mobile. The fix adds shouldPopoverUseScrollView to the ButtonWithDropdownMenu in ImportColumn.tsx, using the established DROPDOWN_SCROLL_THRESHOLD pattern to enable scrolling when options >= 5. Co-authored-by: truph01 <truph01@users.noreply.github.com>
Explanation of Change
The CSV member import flow (Workspace → Members → Import from spreadsheet) was missing 4 column mapping options that exist in Expensify Classic: Custom Field 1, Custom Field 2, Approval Limit, and Over Limit Forward To.
The infrastructure for these fields already existed — the constants in
CONST.CSV_IMPORT_COLUMNS, the auto-detection logic inImportColumn.tsx, and thePolicyEmployeetype all support them. They were simply never wired into the member import column mapping UI, the parsing logic, or the API call.This PR:
columnRolesarray inImportedMembersPage.tsximportMembersparsing logic to extract these columns from the spreadsheet dataImportedSpreadsheetMemberDatatype with the 4 optional fieldsPolicyMembertype andimportPolicyMembersfunction inMember.tsto include the new fields in the API payloadFixed Issues
$ #83387
PROPOSAL: #83387 (comment)
Tests
Offline tests
N/A — CSV import requires network to upload. The existing offline handling applies unchanged.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari