Closed lanitochka17 closed 2 months ago
Triggered auto assignment to @joekaufmanexpensify (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.
We think that this bug might be related to #wave-control
@joekaufmanexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
In Step 12, the incorrect tax rate name in editor is displayed after creating a new tax rate with the old tax rate name In Step 14, when opening tax rate name editor, it displays the correct name even though the previous page shows the incorrect name
When we edit the tax code, the previousTaxCode
is added to the optimistic data to store the previous tax code name and used to fix the not found page when we go back to the tax detail page. But we don't remove it in success data.
Then when we get the currentTaxID
here, it returns the first tax that we created and edited the tax code because it's the first item matches the condition in getCurrentTaxID
function here
We should reset the previousTaxCode
in successData
here
previousTaxCode: null
Maybe the bug still happens if we do the same case in offline mode, so we also need to update getCurrentTaxID
function to prioritize the tax that has taxIDKey
is the taxID
. If it doesn't exist then we will find the tax that has the previousTaxCode
is taxID
https://github.com/Expensify/App/blob/cfa84e21c1a5540f798f3fdfd76ecbd64a546704/src/libs/PolicyUtils.ts#L959-L960
Hmm, I can reproduce this, but the reproduction steps feel very niche. I am not convinced this is a real case that a customer would experience...If someone adds a tax code and then changes that tax code AND tax rate, why would they then immediately go and add another separate tax code to replace the one they just changed away from?
They would just add a new tax code if they wanted to add one in addition to the one they've already created.
Further, this only happens if you change both the tax rate and tax code. If it's only the code, there's no issue. And even if you do experience it, if you change the tax rate again, the issue disappears.
Going to close this for now, as I don't think this is something we need to prioritize changing. We can revisit if any actual customers experience this. Let me know if anyone disagrees!
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.20-4 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
In Step 12, the correct tax rate name in editor should be displayed after creating a new tax rate with the old tax rate name
Actual Result:
In Step 12, the incorrect tax rate name in editor is displayed after creating a new tax rate with the old tax rate name In Step 14, when opening tax rate name editor, it displays the correct name even though the previous page shows the incorrect name
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/805a8b67-4fca-4dbf-a932-86491a2ac937
View all open jobs on GitHub