You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2025-01-13] [$125] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish #53916
Version Number: 9.0.74-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Exp Email or phone of affected tester (no customers):applausetester+kh1311020@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Precondition:
App language is Spanish.
Default workspace currency is USD.
Invoices feature is enabled.
Go to staging.new.expensify.com
Go to Account settings.
Note that the currency and amount in the Wallet (Billetera) badge is in the format of 0,00 US$
Go to workspace settings.
Expected Result:
The currency and amount in the Invoices (Facturas) badge will change to the format of 0,00 US$
Actual Result:
The currency and amount in the Invoices (Facturas) badge is still $0.00.
Edited by proposal-police: This proposal was edited at 2024-12-11 11:33:12 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish
What is the root cause of that problem?
We are using CurrencyUtils.convertToFrontendAmountAsString to format the amount to a floating number and then we prefix it with currency. convertToFrontendAmountAsString doesn't return a localized floating number as convertToDisplayString
What changes do you think we should make in order to solve the problem?
We should use convertToDisplayString instead of convertToFrontendAmountAsString to localize the amount as we are doing on WorkspaceInvoiceBalanceSection. And remove CurrencyUtils.getCurrencySymbol call
changed the title [-]Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/-][+][$250] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/+]on Dec 11, 2024
changed the title [-][$250] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/-][+][$125] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/+]on Dec 11, 2024
Please re-state the problem that we are trying to solve in this issue.
The currency and amount in the Invoices (Facturas) badge is still $0.00.
What is the root cause of that problem?
The invoice badge is always displayed with the format ${currency}{amount} that is inconsistent with the balance that we displayed in WorkspaceInvoiceBalanceSectionhere and I notice that the badge is also displayed with the wrong currency. It displays with the workspace currency while in WorkspaceInvoiceBalanceSection we display with USD currency with the same value is policy?.invoice?.bankAccount?.stripeConnectAccountBalance
The Invoices badge manually concatenates the currency symbol with function convertToFrontendAmountAsString that just converts the amount to a string, but does not handle localization or currency formatting
What changes do you think we should make in order to solve the problem?
Should use convertToDisplayString instead of convertToFrontendAmountAsString. This will properly handle currency formatting and localization in a single function call and provides a more consistent user experience across the application
changed the title [-][$125] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/-][+][HOLD for payment 2025-01-13] [$125] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/+]on Jan 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dukenv0307@sonialiap / @jliexpensify@dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Dec 11, 2024
Triggered auto assignment to @sonialiap (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.etCoderDysto commentedon Dec 11, 2024
Edited by proposal-police: This proposal was edited at 2024-12-11 11:33:12 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Invoices - Invoices badge is$0.00 instead of 0,00 US$ when app language is Spanish
What is the root cause of that problem?
We are using
CurrencyUtils.convertToFrontendAmountAsStringto format the amount to a floating number and then we prefix it with currency.convertToFrontendAmountAsStringdoesn't return a localized floating number asconvertToDisplayStringApp/src/pages/workspace/WorkspaceInitialPage.tsx
Lines 204 to 206 in dac90e1
What changes do you think we should make in order to solve the problem?
We should use
convertToDisplayStringinstead ofconvertToFrontendAmountAsStringto localize the amount as we are doing onWorkspaceInvoiceBalanceSection. And remove CurrencyUtils.getCurrencySymbol callWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
UI issue
What alternative solutions did you explore? (Optional)
melvin-bot commentedon Dec 11, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021866918061086756277
[-]Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/-][+][$250] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/+]melvin-bot commentedon Dec 11, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 (
External)[-][$250] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/-][+][$125] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/+]melvin-bot commentedon Dec 11, 2024
Upwork job price has been updated to $125
nkdengineer commentedon Dec 11, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The currency and amount in the Invoices (Facturas) badge is still $0.00.
What is the root cause of that problem?
The invoice badge is always displayed with the format
${currency}{amount}that is inconsistent with the balance that we displayed inWorkspaceInvoiceBalanceSectionhere and I notice that the badge is also displayed with the wrong currency. It displays with the workspace currency while inWorkspaceInvoiceBalanceSectionwe display withUSDcurrency with the same value ispolicy?.invoice?.bankAccount?.stripeConnectAccountBalanceApp/src/pages/workspace/WorkspaceInitialPage.tsx
Lines 204 to 207 in 20b4c7d
What changes do you think we should make in order to solve the problem?
We should use
convertToDisplayStringfunction without currency code then it will default toUSDas we did hereApp/src/pages/workspace/WorkspaceInitialPage.tsx
Lines 204 to 207 in 20b4c7d
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
If the correct currency should be the workspace currency, we need to add the worksapce currency to
convertToDisplayStringhereApp/src/pages/workspace/WorkspaceInitialPage.tsx
Lines 204 to 207 in 20b4c7d
and here
App/src/pages/workspace/invoices/WorkspaceInvoiceBalanceSection.tsx
Line 31 in 20b4c7d
hungdannt commentedon Dec 12, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Invoices badge displays '$0.00', but it should be formatted as 0,00 US$ when the app language is set to Spanish
What is the root cause of that problem?
App/src/pages/workspace/WorkspaceInitialPage.tsx
Lines 204 to 206 in dac90e1
The Invoices badge manually concatenates the currency symbol with function
convertToFrontendAmountAsStringthat just converts the amount to a string, but does not handle localization or currency formattingWhat changes do you think we should make in order to solve the problem?
Should use
convertToDisplayStringinstead ofconvertToFrontendAmountAsString. This will properly handle currency formatting and localization in a single function call and provides a more consistent user experience across the applicationThe suggested change:
POC :
https://github.com/user-attachments/assets/b30785d3-f8a6-4233-a73c-c64b7c67340f
What alternative solutions did you explore? (Optional)
N/A
33 remaining items
[-][$125] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/-][+][HOLD for payment 2025-01-13] [$125] Invoices - Invoices badge is $0.00 instead of 0,00 US$ when app language is Spanish[/+]melvin-bot commentedon Jan 6, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-01-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 6, 2025
@dukenv0307 @sonialiap / @jliexpensify @dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
dukenv0307 commentedon Jan 7, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/50565/files#r1904876773
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/460658
Regression Test Proposal
Test:
Do we agree 👍 or 👎
sonialiap commentedon Jan 14, 2025
Payment summary:
JmillsExpensify commentedon Feb 10, 2025
$125 approved for @dukenv0307