Repository navigation
Add optional Card Name column to company-card CSV import - #96912
Conversation
Card-identity is now either/or in the company-card CSV mapping step: map a card number or a card name (at least one). Enables routing uploaded rows to cards by name, matching the OldDot upload flow and the shared feed backend.
🦜 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 5a5a727c355..57a942b1942 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -5819,7 +5819,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
requiredColumns: (missingColumns: string) => `Bitte weisen Sie jeder der folgenden Eigenschaften eine Spalte zu: ${missingColumns}.`,
duplicateColumns: (duplicateColumn: string) =>
`Ups! Du hast ein einzelnes Feld („${duplicateColumn}“) mehreren Spalten zugeordnet. Bitte überprüfe die Zuordnung und versuche es erneut.`,
- cardIdentityColumn: 'Bitte ordne eine Kartennummer oder einen Kartennamen zu, damit Transaktionen einer Karte zugeordnet werden können.',
+ cardIdentityColumn: 'Bitte ordnen Sie eine Kartennummer oder einen Kartennamen zu, damit Transaktionen einer Karte zugeordnet werden können.',
},
fileImportDescription: 'Eine manuelle Option, falls Ihre Bank keinen Feed senden kann.',
duplicateFeedModal: {title: 'Karten-Feed bereits verbunden', prompt: 'Sie können denselben Kartenfeed nicht zweimal zu demselben Workspace hinzufügen.'},
diff --git a/src/languages/es.ts b/src/languages/es.ts
index d303136f858..66239ea67dd 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -5643,7 +5643,7 @@ ${amount} para ${merchant} - ${date}`,
csvErrors: {
requiredColumns: (missingColumns: string) => `Por favor, asigna una columna a cada uno de los atributos: ${missingColumns}.`,
duplicateColumns: (duplicateColumn: string) => `¡Ups! Has asignado un solo campo ("${duplicateColumn}") a múltiples columnas. Por favor, revisa y vuelve a intentarlo.`,
- cardIdentityColumn: 'Asigna un número de tarjeta o un nombre de tarjeta para que las transacciones puedan asociarse a una tarjeta.',
+ cardIdentityColumn: 'Asocia un número de tarjeta o un nombre de tarjeta para que las transacciones puedan vincularse a una tarjeta.',
},
duplicateFeedModal: {title: 'Feed de tarjeta ya conectado', prompt: 'No puedes añadir el mismo flujo de tarjeta al mismo espacio de trabajo dos veces.'},
},
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 9a9bc855f72..9127ce9e1b3 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -5830,7 +5830,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
csvErrors: {
requiredColumns: (missingColumns: string) => `Veuillez attribuer une colonne à chacun des attributs : ${missingColumns}.`,
duplicateColumns: (duplicateColumn: string) => `Oups ! Vous avez associé un seul champ (« ${duplicateColumn} ») à plusieurs colonnes. Veuillez vérifier et réessayer.`,
- cardIdentityColumn: 'Veuillez associer un numéro de carte ou un nom de carte pour que les transactions puissent être associées à une carte.',
+ cardIdentityColumn: 'Veuillez associer un numéro de carte ou un nom de carte afin que les transactions puissent être rapprochées d’une carte.',
},
fileImportDescription: 'Une option manuelle si votre banque ne peut pas envoyer de flux.',
duplicateFeedModal: {title: 'Flux de carte déjà connecté', prompt: 'Vous ne pouvez pas ajouter deux fois le même flux de carte au même espace de travail.'},
diff --git a/src/languages/it.ts b/src/languages/it.ts
index a3db09b0555..c3d46322c86 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -5778,7 +5778,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
},
csvColumns: {
cardNumber: 'Numero di carta',
- cardName: 'Nome della carta',
+ cardName: 'Nome carta',
postedDate: 'Data',
merchant: 'Esercente',
amount: 'Importo',
@@ -5794,7 +5794,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
csvErrors: {
requiredColumns: (missingColumns: string) => `Assegna una colonna a ciascuno degli attributi: ${missingColumns}.`,
duplicateColumns: (duplicateColumn: string) => `Ops! Hai associato un singolo campo ("${duplicateColumn}") a più colonne. Controlla e riprova.`,
- cardIdentityColumn: 'Assegna un numero di carta o un nome di carta per associare le transazioni a una carta.',
+ cardIdentityColumn: 'Abbina un numero di carta o un nome della carta così le transazioni potranno essere associate a una carta.',
},
fileImportDescription: "Un'opzione manuale se la tua banca non può inviare un feed.",
duplicateFeedModal: {title: 'Feed carta già collegato', prompt: 'Non puoi aggiungere due volte lo stesso feed della carta allo stesso spazio di lavoro.'},
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 5bd6499beea..a8aa6251a45 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -5735,7 +5735,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
csvErrors: {
requiredColumns: (missingColumns: string) => `各属性に列を割り当ててください:${missingColumns}`,
duplicateColumns: (duplicateColumn: string) => `おっと!1 つのフィールド("${duplicateColumn}")を複数の列にマッピングしています。確認して、もう一度お試しください。`,
- cardIdentityColumn: '取引をカードに紐付けられるように、カード番号またはカード名を割り当ててください。',
+ cardIdentityColumn: '取引をカードに照合できるように、カード番号またはカード名を対応付けてください。',
},
fileImportDescription: '銀行からフィードを送信できない場合の手動オプションです。',
duplicateFeedModal: {title: 'カードフィードはすでに接続されています', prompt: '同じカードフィードを同じワークスペースに二重に追加することはできません。'},
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index b75701c91b6..f080c097a9e 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -5787,7 +5787,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
requiredColumns: (missingColumns: string) => `Wijs een kolom toe aan elk van de attributen: ${missingColumns}.`,
duplicateColumns: (duplicateColumn: string) =>
`Oeps! Je hebt één enkel veld (“${duplicateColumn}”) aan meerdere kolommen gekoppeld. Controleer dit en probeer het opnieuw.`,
- cardIdentityColumn: 'Wijs een kaartnummer of een kaartnaam toe zodat transacties aan een kaart kunnen worden gekoppeld.',
+ cardIdentityColumn: 'Koppel een kaartnummer of een kaartnaam zodat transacties aan een kaart kunnen worden gekoppeld.',
},
fileImportDescription: 'Een handmatige optie als je bank geen feed kan versturen.',
duplicateFeedModal: {title: 'Kaartfeed al verbonden', prompt: 'Je kunt dezelfde kaartfeed niet twee keer aan dezelfde workspace toevoegen.'},
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 1f311bc63ec..05ba9ac1b73 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -5769,7 +5769,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
csvErrors: {
requiredColumns: (missingColumns: string) => `Przypisz kolumnę do każdego z atrybutów: ${missingColumns}.`,
duplicateColumns: (duplicateColumn: string) => `Ups! Przypisałeś jedno pole („${duplicateColumn}”) do wielu kolumn. Sprawdź i spróbuj ponownie.`,
- cardIdentityColumn: 'Przypisz numer karty lub nazwę karty, aby transakcje mogły zostać dopasowane do karty.',
+ cardIdentityColumn: 'Przypisz numer karty lub nazwę karty, żeby transakcje mogły być dopasowane do karty.',
},
fileImportDescription: 'Ręczna opcja, jeśli Twój bank nie może wysyłać kanału danych.',
duplicateFeedModal: {title: 'Kanał karty jest już połączony', prompt: 'Nie możesz dodać tego samego źródła danych karty do tego samego obszaru roboczego dwa razy.'},
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 287dea4ff08..0bfcf9ffa37 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -5777,7 +5777,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
csvErrors: {
requiredColumns: (missingColumns: string) => `Atribua uma coluna a cada um dos atributos: ${missingColumns}.`,
duplicateColumns: (duplicateColumn: string) => `Ops! Você mapeou um único campo ("${duplicateColumn}") para várias colunas. Revise e tente novamente.`,
- cardIdentityColumn: 'Mapeie um número de cartão ou um nome de cartão para que as transações possam ser associadas a um cartão.',
+ cardIdentityColumn: 'Associe um número de cartão ou um nome de cartão para que as transações possam ser vinculadas a um cartão.',
},
fileImportDescription: 'Uma opção manual caso seu banco não possa enviar um feed.',
duplicateFeedModal: {title: 'Feed do cartão já conectado', prompt: 'Você não pode adicionar o mesmo feed de cartão ao mesmo workspace duas vezes.'},
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 97f3130e9a8..0a39e96f57c 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -5594,7 +5594,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
},
csvColumns: {
cardNumber: '卡号',
- cardName: '卡片名称',
+ cardName: '卡名',
postedDate: '日期',
merchant: '商家',
amount: '金额',
@@ -5610,7 +5610,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
csvErrors: {
requiredColumns: (missingColumns: string) => `请为以下每个属性分配一列:${missingColumns}`,
duplicateColumns: (duplicateColumn: string) => `哎呀!你已将单个字段(“${duplicateColumn}”)映射到了多个列。请检查后重试。`,
- cardIdentityColumn: '请映射卡号或卡片名称,以便将交易匹配到对应的卡片。',
+ cardIdentityColumn: '请映射卡号或卡名称,以便将交易匹配到相应的卡片。',
},
fileImportDescription: '如果您的银行无法发送数据馈送时的手动选项。',
duplicateFeedModal: {title: '卡片流水已连接', prompt: '您不能将同一张卡片流水两次添加到同一个工作区。'},
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
No need for C+ on this one |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 justinpersaud has triggered a test Expensify/App build. You can view the workflow run here. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e1e40812a
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This comment has been minimized.
This comment has been minimized.
The empty-value check only scanned required columns; since cardNumber is no longer required, blank card numbers/names slipped through. Extend the check to the mapped cardNumber/cardName column so rows without a card identity are caught before import.
|
🚧 justinpersaud has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 justinpersaud 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. |
Add optional Card Name column to company-card CSV import (cherry picked from commit 8d17456) (cherry-picked to staging by Beamanator)
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.4.44-2 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.44-6 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.4.45-0 🚀
|
Help site docs — changes required ✅This PR adds an optional Card name column to the NewDot company-card CSV import mapping, making card identity either/or (a feed can map a Card number or a Card name, at least one required). That behavior is documented on the help site, so an update was needed. Article affected: Import Company Card Transactions From a Spreadsheet — it previously stated a Card number was always required. Draft help-site PR: #97143 What I changed there:
UI labels were verified against The personal-card spreadsheet import article was not touched, since this PR only changes @justinpersaud, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.45-14 🚀
Bundle Size Analysis (Sentry): |
|
This made the card number column optional and broke PR #101569 fixed it. |
Explanation of Change
Adds an optional Card Name column to the NewDot company-card CSV import mapping step (
CompanyCardsImportedPage). Card-identity is now either/or: a feed maps a card number or a card name (at least one required), instead of always requiring a card number. This lets admins auto-match uploaded transactions to cards by name — the NewDot counterpart of the OldDot upload flow.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/662568
PROPOSAL: N/A (internal feature)
Tests
Card Namecolumn (and no card-number column).Card Namecolumn; leave card number unmapped.Offline tests
Same as Tests — the mapping/validation step is client-side; submission surfaces the standard offline handling for
ImportCSVCompanyCards.QA Steps
Card Namecolumn (no card number), rows tagged for each card.I used this CSV
2-card-name-match.csv
It has 6 rows and only 4 should import
And here is one for the existing card number format
1-card-number-seed.csv
This is a new feature so if it doesn't cause any regressions with the existing CSV upload by card number only, then it should not be considered a blocker and we'll fix any issues.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos