[Payment due @shubham1206agra] Add policy changelog report action system messages for: Changing a default spend category#88558
Conversation
…d translations in report names, context menu copy, sidebar, options list
…onsListUtils, ReportNameUtils, and SidebarUtils
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
🦜 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 0c8f0092..61390433 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7498,6 +7498,8 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
`Kartenfeed-Tag für das Abrechnungsperiodenende von „${feedName}“ geändert${newValue ? ` in „${newValue}“` : ''}${previousValue ? ` (zuvor „${previousValue}“)` : ''}`,
addedReportField: ({fieldType, fieldName, defaultValue}: AddedOrDeletedPolicyReportFieldParams) =>
`${fieldType}-Berichtsfeld „${fieldName}“${defaultValue ? ` mit Standardwert „${defaultValue}“` : ''} hinzugefügt`,
+ updatedMccGroupCategory: ({mccGroupName, oldCategory, newCategory}: {mccGroupName: string; oldCategory: string; newCategory: string}) =>
+ `hat die Standardausgabenkategorie für „${mccGroupName}“ in „${newCategory}“ geändert (zuvor „${oldCategory}“)`,
},
roomMembersPage: {
memberNotFound: 'Mitglied nicht gefunden.',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 62d12fdb..e5f4bf38 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -7520,6 +7520,8 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
`a modifié le jour de fin de période de relevé du flux de carte « ${feedName} »${newValue ? ` à « ${newValue} »` : ''}${previousValue ? ` (précédemment « ${previousValue} »)` : ''}`,
addedReportField: ({fieldType, fieldName, defaultValue}: AddedOrDeletedPolicyReportFieldParams) =>
`a ajouté le champ de note de frais ${fieldType} « ${fieldName} »${defaultValue ? ` avec la valeur par défaut « ${defaultValue} »` : ''}`,
+ updatedMccGroupCategory: ({mccGroupName, oldCategory, newCategory}: {mccGroupName: string; oldCategory: string; newCategory: string}) =>
+ `a modifié la catégorie de dépense par défaut pour « ${mccGroupName} » en « ${newCategory} » (auparavant « ${oldCategory} »)`,
},
roomMembersPage: {
memberNotFound: 'Membre introuvable.',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index 3ed65ebe..c5eb4644 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7485,6 +7485,8 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
`ha modificato il giorno di fine periodo dell’estratto conto del flusso carta "${feedName}"${newValue ? ` a "${newValue}"` : ''}${previousValue ? ` (in precedenza "${previousValue}")` : ''}`,
addedReportField: ({fieldType, fieldName, defaultValue}: AddedOrDeletedPolicyReportFieldParams) =>
`aggiunto campo di report ${fieldType} "${fieldName}"${defaultValue ? ` con valore predefinito "${defaultValue}"` : ''}`,
+ updatedMccGroupCategory: ({mccGroupName, oldCategory, newCategory}: {mccGroupName: string; oldCategory: string; newCategory: string}) =>
+ `ha modificato la categoria di spesa predefinita per "${mccGroupName}" in "${newCategory}" (precedentemente "${oldCategory}")`,
},
roomMembersPage: {
memberNotFound: 'Membro non trovato.',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 2723e83a..08a6e120 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7394,6 +7394,8 @@ ${reportName}
`カード明細フィード「${feedName}」の利用明細期間の終了日を変更しました${newValue ? ` を「${newValue}」に` : ''}${previousValue ? ` (以前の値:「${previousValue}」)` : ''}`,
addedReportField: ({fieldType, fieldName, defaultValue}: AddedOrDeletedPolicyReportFieldParams) =>
`${fieldType}レポートフィールド「${fieldName}」を追加しました${defaultValue ? ` デフォルト値「${defaultValue}」付き` : ''}`,
+ updatedMccGroupCategory: ({mccGroupName, oldCategory, newCategory}: {mccGroupName: string; oldCategory: string; newCategory: string}) =>
+ `「${mccGroupName}」のデフォルト支出カテゴリーを「${newCategory}」に変更しました(以前は「${oldCategory}」)`,
},
roomMembersPage: {
memberNotFound: 'メンバーが見つかりません。',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 4c7a16b4..555d521b 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7462,6 +7462,8 @@ Voeg meer bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
`heeft de einddag van de afrekenperiode van kaartfeed "${feedName}" gewijzigd${newValue ? ` naar "${newValue}"` : ''}${previousValue ? ` (voorheen "${previousValue}")` : ''}`,
addedReportField: ({fieldType, fieldName, defaultValue}: AddedOrDeletedPolicyReportFieldParams) =>
`heeft ${fieldType}-rapportveld "${fieldName}" toegevoegd${defaultValue ? ` met standaardwaarde "${defaultValue}"` : ''}`,
+ updatedMccGroupCategory: ({mccGroupName, oldCategory, newCategory}: {mccGroupName: string; oldCategory: string; newCategory: string}) =>
+ `heeft de standaarduitgavencategorie voor ‘${mccGroupName}’ gewijzigd in ‘${newCategory}’ (voorheen ‘${oldCategory}’)`,
},
roomMembersPage: {
memberNotFound: 'Lid niet gevonden.',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index a0291f78..a4054367 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7453,6 +7453,8 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
`zmienił dzień zakończenia okresu rozliczeniowego dla źródła karty „${feedName}”${newValue ? ` na „${newValue}”` : ''}${previousValue ? ` (wcześniej „${previousValue}”)` : ''}`,
addedReportField: ({fieldType, fieldName, defaultValue}: AddedOrDeletedPolicyReportFieldParams) =>
`dodano pole raportu typu ${fieldType} „${fieldName}”${defaultValue ? ` z domyślną wartością „${defaultValue}”` : ''}`,
+ updatedMccGroupCategory: ({mccGroupName, oldCategory, newCategory}: {mccGroupName: string; oldCategory: string; newCategory: string}) =>
+ `zmieniono domyślną kategorię wydatków dla „${mccGroupName}” na „${newCategory}” (poprzednio „${oldCategory}”)`,
},
roomMembersPage: {
memberNotFound: 'Nie znaleziono członka.',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 5b236b8b..347287de 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7454,6 +7454,8 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
`changed card feed "${feedName}" statement period end day${newValue ? ` para "${newValue}"` : ''}${previousValue ? `(antes " ${previousValue}")` : ''}`,
addedReportField: ({fieldType, fieldName, defaultValue}: AddedOrDeletedPolicyReportFieldParams) =>
`adicionou o campo de relatório ${fieldType} "${fieldName}"${defaultValue ? ` com valor padrão "${defaultValue}"` : ''}`,
+ updatedMccGroupCategory: ({mccGroupName, oldCategory, newCategory}: {mccGroupName: string; oldCategory: string; newCategory: string}) =>
+ `alterou a categoria de gasto padrão de "${mccGroupName}" para "${newCategory}" (antes "${oldCategory}")`,
},
roomMembersPage: {
memberNotFound: 'Membro não encontrado.',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 49c115df..a8621793 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7265,6 +7265,8 @@ ${reportName}
`已更改卡片流水“${feedName}”的账单周期截止日${newValue ? ` 为“${newValue}”` : ''}${previousValue ? ` (先前为“${previousValue}”)` : ''}`,
addedReportField: ({fieldType, fieldName, defaultValue}: AddedOrDeletedPolicyReportFieldParams) =>
`已添加 ${fieldType} 报告字段“${fieldName}”${defaultValue ? ` 默认值为“${defaultValue}”` : ''}`,
+ updatedMccGroupCategory: ({mccGroupName, oldCategory, newCategory}: {mccGroupName: string; oldCategory: string; newCategory: string}) =>
+ `已将“${mccGroupName}”的默认支出类别更改为“${newCategory}”(此前为“${oldCategory}”)`,
},
roomMembersPage: {
memberNotFound: '未找到成员。',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
…ategory-for-MCC-group
…lt-spend-category-for-MCC-group
…ategory-for-MCC-group
|
@shubham1206agra 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] |
| `changed the auto-pay approved reports threshold to "${newLimit}" (previously "${oldLimit}")`, | ||
| removedAutoPayApprovedReportsLimit: 'removed the auto-pay approved reports threshold', | ||
| updatedMccGroupCategory: ({mccGroupName, oldCategory, newCategory}: {mccGroupName: string; oldCategory: string; newCategory: string}) => | ||
| `changed the default spend category for "${mccGroupName}" to "${newCategory}" (previously "${oldCategory}")`, |
There was a problem hiding this comment.
@rayane-d Can you make the messages similar to getAutoReimbursementMessage?
There was a problem hiding this comment.
@shubham1206agra Do you mean the "set …", "updated …", "removed …" pattern? I intentionally used only "changed …" because MCC groups always have a default category assigned at creation time. Since the product does not allow those default values to be removed, the only supported action in this case is changing them.
There was a problem hiding this comment.
@rayane-d Are you sure as I can see this on my policy?
There was a problem hiding this comment.
@shubham1206agra I think the case you're seeing happens when a category that was selected in one of the default spend categories is disabled or deleted. In that situation, the value becomes "Uncategorized".
Since we already log a changelog system message when a category is disabled or deleted, I don't think we need to create duplicate changelog entries for the resulting default spend category removal.
Also, when a category is later assigned to one of these default spend categories, we correctly log a changelog with "Uncategorized" as the previous value.
Example:
changed the default spend category for "Airlines" to "Interest" (previously "Uncategorized")
…lt-spend-category-for-MCC-group
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-06-02.at.6.46.45.PM.mov |
|
🎯 @shubham1206agra, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
🚧 @MariaHCD 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/MariaHCD in version: 9.3.98-0 🚀
Bundle Size Analysis (Sentry): |
Help site review — no changes requiredI reviewed the changes in this PR against the help site files under Why: This PR only adds NewDot rendering support for an existing policy changelog system message — the The underlying feature — setting/changing a default spend category by MCC group — is already documented and unchanged by this PR:
The help site documents how users perform this action, not the exact wording of #admins audit/changelog system messages (no equivalent message text for other policy-change-log actions is enumerated in the docs either). Because this is a presentation/rendering change for a system message, there is nothing in Accordingly, I did not open a draft docs PR. @rayane-d, please confirm you agree no help site changes are needed here. If you believe a docs update is warranted (e.g., you'd like the #admins audit messages documented), let me know and I'll create the draft PR. |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.98-3 🚀
|
|
🤖 Payment issue created: #92628 |
Explanation of Change
This PR add support for NewDot to render the new
POLICYCHANGELOG_UPDATE_MCC_GROUP_CATEGORYpolicy changelog report action.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/627446
PROPOSAL:
Tests
Categoriesscreen in your workspaceMoreat the top right cornerSettingsto open the listchanged the default spend category for "${mccGroupName}" to "${newCategory}" (previously "${oldCategory}")10, Verify that: The LHN sidebar preview shows the correct changelog message text
Offline tests
N/A
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
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
recording.mov