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
Expense - Report action shows "changed tax rate to x(previously x)" when there is no rate change #54560
Version Number: 9.0.78-2 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod 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+kh1012020@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.0 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Rules and Taxes are enabled.
There are two tax rates - A and B.
Tax rate A belongs to Workspace and Foreign currency default.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can write automated tests for updateMoneyRequestCategory
What alternative solutions did you explore? (Optional)
We can modify the ModifiedExpenseMessage .buildMessageFragmentForValue function to compare newValue and oldValue. If they are the same, the fragment should not be pushed to changeFragments
I think this is not a duplicate 🤔. The expected outcome for this issue is that no system message for the taxRate is displayed, whereas #54559 focuses on consistency between changing, removing, or setting Category and tax system messages
Activity
melvin-bot commentedon Dec 25, 2024
Triggered auto assignment to @anmurali (
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.melvin-bot commentedon Dec 25, 2024
Triggered auto assignment to @youssef-lr (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Dec 25, 2024
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Dec 25, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
linhvovan29546 commentedon Dec 25, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Report action shows "changed tax rate to x(previously x)" when there is no rate change
What is the root cause of that problem?
When update
category, we use this function to buildoptimisticDatafor report actions when setting a categoryApp/src/libs/ReportUtils.ts
Lines 3730 to 3736 in 12e0941
However, this function does not compare
transactionChangeswitholdTransaction, which causes the system message to display incorrect text:App/src/libs/ReportUtils.ts
Lines 3778 to 3779 in 12e0941
What changes do you think we should make in order to solve the problem?
We need to compare the
taxCodeof the new transaction with that of the old transaction.and similar for
taxAmountPOC
Screen.Recording.2024-12-25.at.9.09.20.PM.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can write automated tests for
updateMoneyRequestCategoryWhat alternative solutions did you explore? (Optional)
We can modify the
ModifiedExpenseMessage .buildMessageFragmentForValuefunction to comparenewValueandoldValue. If they are the same, thefragmentshould not be pushed tochangeFragmentsApp/src/libs/ModifiedExpenseMessage.ts
Lines 67 to 70 in 918488a
allgandalf commentedon Dec 25, 2024
@linhvovan29546 can you point the offending PR here ?
linhvovan29546 commentedon Dec 25, 2024
@allgandalf The logic originates from PR #42128. And in the PR Apply tax rule when selecting category, we added
taxCodeandtaxAmountbased on the selected category, which caused the system message to display incorrectly.youssef-lr commentedon Dec 25, 2024
Dupe of #54559
linhvovan29546 commentedon Dec 25, 2024
I think this is not a duplicate 🤔. The expected outcome for this issue is that no system message for the
taxRateis displayed, whereas #54559 focuses on consistency between changing, removing, or settingCategoryand tax system messages