-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-07-10] [$250] [Track tax] Disabled tax rate can be selected #43613
Comments
Triggered auto assignment to @stephanieelliott ( |
@stephanieelliott 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 |
We think that this bug might be related to #wave-collect - Release 2 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Track tax - Disabled tax rate can be selected What is the root cause of that problem?Tax rates are not filtered based on the enabled state. App/src/pages/workspace/distanceRates/PolicyDistanceRateTaxRateEditPage.tsx Lines 39 to 51 in d0b3552
What changes do you think we should make in order to solve the problem?Filter out disabled tax rates using const taxRateItems: ListItemType[] = useMemo(
() =>
Object.entries(policy?.taxRates?.taxes ?? {})
.filter(([, value]) => !value.isDisabled)
.map(([key, value]) => ({
value: key,
text: `${value.name} (${value.value})`,
isSelected: taxRateExternalID === key,
keyForList: key,
pendingAction: value.pendingAction,
isDisabled: value.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
})),
[policy, taxRateExternalID],
); What alternative solutions did you explore? (Optional)We can disable the option instead of filtering, in that case we just need to modify the isDisabled: value.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || value.isDisabled, What alternative solutions did you explore? (Optional 2)We can use
|
Job added to Upwork: https://www.upwork.com/jobs/~01b142f41c7ec7f0fd |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Track tax - Disabled tax rate can be selected What is the root cause of that problem?In PolicyDistanceRateTaxRateEditPage.tsx, we refrain from utilizing TaxPicker, which includes the logic to exclude disabled rates What changes do you think we should make in order to solve the problem?In PolicyDistanceRateTaxRateEditPage.tsx, it's advisable to reuse TaxPicker
We should also hide the selected tax rate if it's disabled (This will require updates in the WORKSPACE_DISTANCE_RATE_DETAILS page, which will be detailed in the pull request)
We need to update onTaxRateChange function and eliminate any unused elements.
With this approach, after this PR is merged, we need to incorporate the onDismiss function and eliminate the existing logic to check duplicated tax in onTaxRateChange function What alternative solutions did you explore? (Optional) |
Thanks for proposals everyone. I like the idea of reusing |
Triggered auto assignment to @amyevans, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Since I'm headed out on leave after today, I won't be around to review the PR. This looks like polish related to the Tax Track project, so I'm going to assign to you @MonilBhavsar 🙇 |
Yes, let's fix it in TaxPicker component |
📣 @hungvu193 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@hungvu193, PR ready for review. |
PR was merged to Main, should go to staging next deploy. |
Triggered auto assignment to @twisterdotcom ( |
Applying the New Feature label to get another BZ member on this while I am OOO til July 10. To catch you up on where we are @twisterdotcom, we have a PR, it was merged to main last week and should be deployed to staging soon: #44046 Thanks for watching over this, I'll grab it back from you when I return! |
Easy peasy. I'm actually also out next week, so this will be pinged around a bit. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-07-10. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Hey @hungvu193 can you complete the NZ checklist please? |
Summarizing payment on this issue:
Upwork job is here: https://www.upwork.com/jobs/~01b142f41c7ec7f0fd |
|
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.82-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4623265
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Expected Result:
In Step 6, app should prevent the disabled tax rate to be selected, which is the Old Dot behavior
Actual Result:
In Step 6, app allows the disabled tax rate to be selected
After submitting distance expense, it shows the "Tax no longer valid" violation
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6511235_1718218613507.20240613_025108.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @twisterdotcom / @stephanieelliottThe text was updated successfully, but these errors were encountered: