-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[$500] [Track Tax] App crashes when reselecting the same tax in confirmation page #39167
Comments
Triggered auto assignment to @sakluger ( |
We think this issue might be related to the #collect project. |
ProposalPlease re-state the problem that we are trying to solve in this issue.App crashes when reselecting the same tax in confirmation page What is the root cause of that problem?If _.find() doesn't find any element with
What changes do you think we should make in order to solve the problem?To avoid this crash, we should add a check to see if the _.find() call returns undefined before accessing the value property.
|
ProposalPlease re-state the problem that we are trying to solve in this issue.App crashes when reselecting the same tax in confirmation page What is the root cause of that problem?when selecting a tax in tax picker, we update the name of the selected tax to contain the here we use App/src/components/TaxPicker.tsx Lines 55 to 58 in 062d53c
App/src/libs/OptionsListUtils.ts Lines 1268 to 1271 in 58515c5
App/src/libs/OptionsListUtils.ts Lines 1236 to 1237 in 58515c5
What changes do you think we should make in order to solve the problem?we need to remove the const sections = useMemo(() => OptionsListUtils.getTaxRatesSection(taxRates, selectedOptions as OptionsListUtils.Category[], searchValue), [taxRates, searchValue, selectedOptions]); POCScreen.Recording.2024-03-28.at.3.38.08.PM.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.The app crashes or does nothing on the web when selecting a selected tax rate. What is the root cause of that problem?When we select a tax rate, it will try to find the selected tax rate on the policy tax rates collection by its name. App/src/pages/iou/request/step/IOURequestStepTaxRatePage.js Lines 43 to 46 in 4fbd218
Every time we select a tax, it will append a App/src/components/TaxPicker.tsx Line 57 in 4fbd218
App/src/libs/OptionsListUtils.ts Lines 1219 to 1221 in 4fbd218
It doesn't alter the real tax name, so when we try to find the tax, it can't find it. For example, if we have tax rate What changes do you think we should make in order to solve the problem?We can remove App/src/components/TaxPicker.tsx Lines 56 to 57 in 4fbd218
and I'm pretty sure that's because we are passing the default rate as the selected tax rate here,
and it makes sense since for the above page (and foreign currency tax rate), we select the default value, so the selected is the same as the default for both of those pages. To fix it, we should introduce a new props to TaxPicker called App/src/components/TaxPicker.tsx Lines 56 to 57 in 4fbd218
|
Proposal updatedPOC video was added. |
Job added to Upwork: https://www.upwork.com/jobs/~0180f0901c994bc80b |
Added to the wave-collect project and added the external label. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha ( |
Reviewing proposals now. |
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. |
Not able to reproduce on |
Thanks for retesting @getusha. I'll close it for now. |
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: 1.4.57-2
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Precondition:
Expected Result:
App does not crash.
Actual Result:
App crashes.
On web, it shows console error.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6429833_1711613479780.Screen_Recording_20240328_160725_New_Expensify.mp4
Bug6429833_1711613479774!QA.txt
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: