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
[$250] Tax - Toggle becomes unlocked, Delete button appears briefly after saving tax code of default rate #45858
Version Number: 9.0.10-2 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause -Internal Team
Action Performed:
Precondition:
Workspace is under Control plan
Taxes feature is enabled
Go to staging.new.expensify.com
Go to workspace settings > Taxes
Click on the default tax rate
Click Tax code
Edit the tax code and save it
Expected Result:
The toggle will remain locked and Delete button will not appear after saving the tax code of the default tax rate
Actual Result:
The toggle becomes unlocked and Delete button appears briefly after saving the tax code of the default tax rate
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 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.
Applying the same pattern on foreignTaxDefault, makes sure that Default badge is displayed on the default tax rate rather than Workspace currency default
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
melvin-bot commentedon Jul 20, 2024
Triggered auto assignment to @cead22 (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Jul 20, 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:
lanitochka17 commentedon Jul 20, 2024
We think that this bug might be related to #wave-control
etCoderDysto commentedon Jul 20, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Tax - Toggle becomes unlocked, Delete button appears briefly after saving tax code of default rate
What is the root cause of that problem?
When updating tax code,
defaultExternalIDis storing the old value, whilenewTaxCodeis updated optimistically to a new value.App/src/libs/actions/TaxRate.ts
Lines 486 to 495 in f3a8f73
Then
canEditTaxRatereturns true comparing the olddefaultExternalIDwith the new tax code hereApp/src/libs/PolicyUtils.ts
Lines 408 to 409 in f3a8f73
Then
shouldShowDeleteMenuItembecomes true we display delete buttonApp/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx
Lines 42 to 44 in f3a8f73
Then BE udpates
defaultExternalIDwith new value and delete button becomes hidden since the newdefaultExternalIDis equal tonewTaxCodeWhat changes do you think we should make in order to solve the problem?
We should set
defaultExternalIDto the new value inoptimisticDataApp/src/libs/actions/TaxRate.ts
Lines 494 to 496 in f3a8f73
And add for
failureDatatoNote: We should apply the same pattern on
foreignTaxDefaultApplying the same pattern on
foreignTaxDefault, makes sure thatDefaultbadge is displayed on the default tax rate rather thanWorkspace currency defaultApp/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx
Lines 82 to 86 in f3a8f73
What alternative solutions did you explore? (Optional)
Result:
Screen.Recording.2024-07-21.at.2.35.03.at.night.mp4
melvin-bot commentedon Jul 20, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
43 remaining items
cead22 commentedon Aug 14, 2024
@rushatgabhane how that PR coming along?
melvin-bot commentedon Aug 19, 2024
@cead22, @mollfpr, @rushatgabhane Huh... This is 4 days overdue. Who can take care of this?
cead22 commentedon Aug 20, 2024
DM'ed @rushatgabhane on slack to ask for an update
melvin-bot commentedon Aug 27, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
melvin-bot commentedon Sep 16, 2024
This issue has not been updated in over 15 days. @cead22, @mollfpr, @rushatgabhane eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
rushatgabhane commentedon Nov 12, 2024
this can be closed