Show GL code when selecting a category#94596
Conversation
|
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 |
|
@cretadn22 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] |
|
This feature needs a small backend change to fully work. The frontend is done and works optimistically, but the new "Show GL codes when categorizing expenses" toggle needs a backend command to persist — otherwise it reverts on the server response and won't survive a reload. Needed on backend (Auth): a new command Already exists, no backend work: per-category Could an internal engineer help add this command? Happy to align on naming if needed. |
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b17b90eb2
ℹ️ 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".
|
@flaviadefaria has been running this one, switching her on for product review. 👍 |
|
@trjExpensify the frontend here is ready. This just needs the backend SetPolicyShowCategoryGLCodes command (persist + return showCategoryGLCodes on the policy). Who owns it, and any rough ETA? 🙏 |
|
I’ve asked @mollfpr to handle the backend work for this issue. Please hold this PR until those backend changes are deployed. |
|
@yusufdeveloper2903 @cretadn22 the BE changes are deployed 🙏 |
9070449 to
ec891d9
Compare
|
Hey @mollfpr 🙏 thanks for deploying! Could you share a few details so I can wire the FE correctly:
On my side the toggle sends showCategoryGLCodes=true but the response comes back false, so I want to make sure I'm matching your contract. Thanks! |
|
Hey @yusufdeveloper2903 ! Here's everything you need: Command name: Params: The value is stored in the policy NVP under the key |
|
@yusufdeveloper2903 Let me know whenever the PR is ready |
203ea6b to
926cbf8
Compare
926cbf8 to
9101436
Compare
|
@cretadn22 this one is ready for review 🙏 Demo video is attached in the PR description. Heads up on CI: the only 2 failing checks — |
|
@yusufdeveloper2903 Please request the translation script generation and merge main |
|
@codex review |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-07-19.at.02.00.20.movAndroid: mWeb ChromeScreen.Recording.2026-07-19.at.02.01.55.moviOS: HybridAppScreen.Recording.2026-07-19.at.01.57.57.moviOS: mWeb SafariScreen.Recording.2026-07-19.at.01.58.48.movMacOS: Chrome / SafariScreen.Recording.2026-07-19.at.01.57.17.mov |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Hi @cretadn22! I don't have an OpenAI API key, so I can't run the translation script locally. Could you run the Generate static translations workflow on this branch, or let me know who I should ask to generate the translations? |
|
@mollfpr Could you assist with triggering the generate translations workflow on this PR? |
🦜 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 95a23c719df..dbfa596052c 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -5974,6 +5974,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
title: 'Es können nicht alle Kategorien gelöscht oder deaktiviert werden',
description: `Mindestens eine Kategorie muss aktiviert bleiben, da dein Workspace Kategorien erfordert.`,
},
+ showCategoryGLCodes: 'Sachkonten beim Kategorisieren von Ausgaben anzeigen',
},
moreFeatures: {
subtitle: 'Verwende die Schalter unten, um beim Wachsen weitere Funktionen zu aktivieren. Jede Funktion wird im Navigationsmenü angezeigt, wo du sie weiter anpassen kannst.',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 9750a85de18..1f14a9d6ddc 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -5791,6 +5791,7 @@ ${amount} para ${merchant} - ${date}`,
title: 'No se pueden eliminar ni deshabilitar todas las categorías',
description: `Debe quedar al menos una categoría habilitada porque tu espacio de trabajo requiere categorías.`,
},
+ showCategoryGLCodes: 'Mostrar códigos GL al categorizar gastos',
},
moreFeatures: {
subtitle: 'Utiliza los botones de abajo para activar más funciones a medida que creces. Cada función aparecerá en el menú de navegación para una mayor personalización.',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 1b75c445f28..85299ff1c9b 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -5987,6 +5987,7 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
title: 'Impossible de supprimer ou de désactiver toutes les catégories',
description: `Au moins une catégorie doit rester activée, car votre espace de travail exige des catégories.`,
},
+ showCategoryGLCodes: 'Afficher les codes de grand livre lors de la catégorisation des dépenses',
},
moreFeatures: {
subtitle:
diff --git a/src/languages/it.ts b/src/languages/it.ts
index dfcdf2ee518..24046cf3242 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -5952,6 +5952,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
title: 'Impossibile eliminare o disattivare tutte le categorie',
description: `Almeno una categoria deve rimanere abilitata perché il tuo spazio di lavoro richiede le categorie.`,
},
+ showCategoryGLCodes: 'Mostra i codici CO.GE. quando classifichi le spese',
},
moreFeatures: {
subtitle:
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 0ffc19ec41b..ff7410e60e3 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -5888,6 +5888,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
title: 'すべてのカテゴリを削除または無効にすることはできません',
description: `ワークスペースでカテゴリが必須のため、少なくとも1つのカテゴリは有効のままにする必要があります。`,
},
+ showCategoryGLCodes: '経費を分類するときに GL コードを表示する',
},
moreFeatures: {
subtitle: 'ビジネスの成長に合わせて、下の切り替えスイッチでさらに多くの機能を有効にしましょう。各機能はナビゲーションメニューに表示され、さらにカスタマイズできます。',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index d34f8495295..bbac2de293d 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -5942,6 +5942,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
title: 'Kan niet alle categorieën verwijderen of uitschakelen',
description: `Minstens één categorie moet ingeschakeld blijven, omdat je werkruimte categorieën vereist.`,
},
+ showCategoryGLCodes: 'Toon GL-codes bij het categoriseren van uitgaven',
},
moreFeatures: {
subtitle: 'Gebruik de schakelaars hieronder om meer functies in te schakelen terwijl je groeit. Elke functie verschijnt in het navigatiemenu voor verdere aanpassing.',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 5171d9d5e5d..3641514eb72 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -5921,6 +5921,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
title: 'Nie można usunąć ani wyłączyć wszystkich kategorii',
description: `Co najmniej jedna kategoria musi pozostać włączona, ponieważ w Twoim workspace wymagane są kategorie.`,
},
+ showCategoryGLCodes: 'Pokaż kody GL podczas kategoryzowania wydatków',
},
moreFeatures: {
subtitle: 'Użyj poniższych przełączników, aby włączać kolejne funkcje w miarę rozwoju. Każda funkcja pojawi się w menu nawigacji, gdzie będzie można ją dalej dostosować.',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index d4c1672a2cb..29bcd6df921 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -5931,6 +5931,7 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
title: 'Não é possível excluir ou desativar todas as categorias',
description: `Pelo menos uma categoria deve permanecer ativada porque seu workspace exige categorias.`,
},
+ showCategoryGLCodes: 'Mostrar códigos GL ao categorizar despesas',
},
moreFeatures: {
subtitle: 'Use as chaves abaixo para ativar mais recursos conforme você cresce. Cada recurso aparecerá no menu de navegação para personalização adicional.',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 5547a6a118a..d3ea42c9eab 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -5774,6 +5774,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
title: '无法删除或停用所有类别',
description: `由于您的工作区需要类别,必须至少保留一个已启用的类别。`,
},
+ showCategoryGLCodes: '在分类报销时显示总账科目代码',
},
moreFeatures: {
subtitle: '使用下方切换按钮,在业务成长过程中启用更多功能。每个功能都会出现在导航菜单中,供你进一步自定义。',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
@yusufdeveloper2903 It's ready |
|
@cretadn22 Ready for review |
Explanation of Change
Adds an opt-in way for admins to surface each category's GL code in the category picker, and to search the picker by GL code.
glCodescapability (policy.glCodes).getCategoryListSections→sortCategories→getCategoryOptionTree) and rendered as the row'salternateText(muted description line) on leaf rows only, per the agreed design (option 3).text/searchText/keyForListstay equal to the raw category name, so selection is unaffected.Fixed Issues
$ #93155
PROPOSAL: #93155 (comment)
Tests
Advertising→4000).Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Before fix:
REC-20260716121415.mp4
After fix:
REC-20260716121516.mp4