Open lanitochka17 opened 3 months ago
Triggered auto assignment to @cead22 (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
:wave: 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:
We think that this bug might be related to #wave-control
Tax - Toggle becomes unlocked, Delete button appears briefly after saving tax code of default rate
When updating tax code, defaultExternalID
is storing the old value, while newTaxCode
is updated optimistically to a new value.
https://github.com/Expensify/App/blob/f3a8f736208166286e6f7da3562f1503d5ef2a3d/src/libs/actions/TaxRate.ts#L486-L495
Then canEditTaxRate
returns true comparing the old defaultExternalID
with the new tax code here
https://github.com/Expensify/App/blob/f3a8f736208166286e6f7da3562f1503d5ef2a3d/src/libs/PolicyUtils.ts#L408-L409
Then shouldShowDeleteMenuItem
becomes true we display delete button
https://github.com/Expensify/App/blob/f3a8f736208166286e6f7da3562f1503d5ef2a3d/src/pages/workspace/taxes/WorkspaceEditTaxPage.tsx#L42-L44
Then BE udpates defaultExternalID
with new value and delete button becomes hidden since the new defaultExternalID
is equal to newTaxCode
We should set defaultExternalID
to the new value in optimisticData
taxRates: {
defaultExternalID: oldTaxCode === policy?.taxRates?.defaultExternalID ? newTaxCode : policy?.taxRates?.defaultExternalID,
https://github.com/Expensify/App/blob/f3a8f736208166286e6f7da3562f1503d5ef2a3d/src/libs/actions/TaxRate.ts#L494-L496
And add for failureData
to
defaultExternalID: policy?.taxRates?.defaultExternalID;
Note: We should apply the same pattern on foreignTaxDefault
foreignTaxDefault: oldTaxCode === policy?.taxRates?.defaultExternalID ? newTaxCode : policy?.taxRates?defaultExternalID,
Applying the same pattern on foreignTaxDefault
, makes sure that Default
badge is displayed on the default tax rate rather than Workspace currency default
https://github.com/Expensify/App/blob/f3a8f736208166286e6f7da3562f1503d5ef2a3d/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx#L82-L86
Result:
https://github.com/user-attachments/assets/11451ed3-9873-4db1-a9bf-78969a4e408e
⚠️ Looks like this issue was linked to a Deploy Blocker here
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.
Job added to Upwork: https://www.upwork.com/jobs/~017da022f8b49cd8bf
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External
)
Contributor details Your Expensify account email: naveed.ajaj@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~0147b6419f14a69c1b
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Contributor details Your Expensify account email: akashftg@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/akashvashishtha
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@etCoderDysto's proposal LGTM!
When we update the default tax rate code, We missed updating defaultExternalID
in optimisticData
and this causes the issue briefly until the backend data received. We also should do the same for the default foreign tax.
🎀 👀 🎀 C+ reviewed
Current assignee @cead22 is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
@ahmedGaber93 @etCoderDysto what PR was this introduced in / was this a regression?
📣 @ahmedGaber93 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @etCoderDysto You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing 📖
@ahmedGaber93 @etCoderDysto what PR was this introduced in / was this a regression?
The issue comes for this PR. The PR introduces a new feature where the user can edit tax code.
I will raise a PR ASAP.
what PR was this introduced in / was this a regression?
@cead22 Yes it seems a regression from a new feature PR https://github.com/Expensify/App/pull/43156, should we continue to fix it here?
@etCoderDysto please let's wait @cead22 decision here https://github.com/Expensify/App/issues/45858#issuecomment-2244652303 before create the PR
Let's follow our normal process for regressions cc @rushatgabhane @mollfpr @Gonals
@rushatgabhane can you please confirm this was caused by https://github.com/Expensify/App/pull/43156 and fix it?
@cead22 yes this is caused by the ^ PR
fix on the way
half way done.
@cead22, @mollfpr, @rushatgabhane, @etCoderDysto Whoops! This issue is 2 days overdue. Let's get this updated quick!
@cead22, @mollfpr, @rushatgabhane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@cead22, @mollfpr, @rushatgabhane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@rushatgabhane do you have an ETA? Just curious
@cead22, @mollfpr, @rushatgabhane Eep! 4 days overdue now. Issues have feelings too...
@rushatgabhane how that PR coming along?
@cead22, @mollfpr, @rushatgabhane Huh... This is 4 days overdue. Who can take care of this?
DM'ed @rushatgabhane on slack to ask for an update
⚠️ Looks like this issue was linked to a Deploy Blocker here
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.
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!
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.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:
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?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/eb97f566-3f25-4d88-82f4-97ebcad424b3
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @ahmedGaber93