-
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
fix: [Dupe detection] Tax code review step shows empty option when workspace does not have tax rate #48958
Conversation
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
Though the PR works, I'm a bit confused about the flow at the moment. I will comment on all the possible solutions today and move forward with whatever seems like the best approach. |
Great :D Let me know if/when I can assit. |
I apologize for the delay. Unfortunately, my health has not been well over the past two weeks, which has caused some setbacks. I understand that this PR, along with a few others, has been delayed, but I am making every effort to complete it this weekend. Much of my time has been spent away from my workplace. However, I am committed to finishing the PRs by the end of the weekend. Thank you for your understanding, and I sincerely apologize again 🙏🏻. |
Working on this, hopefully this will be ready for review in 1-2 hours. |
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
Wasn't able to complete this yesterday :(, this once is bit complex. Will work again today. |
Good work @Krishna2323 ! Let's me know if can help . |
I have changed my approach a bit from my proposal here. However, the behavior remains the same. We will skip the tax selection page if the policy does not include any tax codes extracted from different transactions. For example:
@brunovjk, what do you think about the implemented behaviour? NOTE: in the video below, we are showing the tax code and tax amount field for the transaction does not have these fields, I'm working on it and this will be fixed soon. Monosnap.screencast.2024-09-17.06-30-04.mp4 |
@Krishna2323 I'm dealing with some problems with my internet. I'll come back here as soon as I resolve it. Thank you |
I'm back @Krishna2323 :D Now at full steam. I'll review it and let you know. |
@pecanoro I’ve tested the recent changes, and everything runs fine without errors. The original issue appears to be resolved. However, before we proceed, could you confirm if the updated behavior, as mentioned in @Krishna2323's comment, aligns with our project expectations? Specifically, we need to ensure the behavior regarding the tax code selection is correct. Once you confirm, I will do a detailed code review and complete the checklist. Is it ok? Thank you! |
@brunovjk @Krishna2323 Yeah, I think that's the best behavior. Thank you for handling edge cases. |
Awesome!! Thank you very much @pecanoro, I will continue with the checklist. |
@Krishna2323 Would you mind merging main to update the branch? Thanks. |
Reported: https://expensify.slack.com/archives/C049HHMV9SM/p1730298247856019 |
Hi @Krishna2323, were you able to confirm the bug? How did your tests go? Any luck with the Android build? Thanks a lot! 😊 |
Yeah, I can reproduce that on. Will be on it in an hour. |
Signed-off-by: krishna2323 <[email protected]>
@brunovjk, this one's fixed. Hopefully, we won't run into more bugs! 😬 |
Great!! I will test it on monday. Did you test it on different platforms? Thank you :D |
@brunovjk, I have updated the test steps and added the recordings for all platforms. |
Reviewer Checklist
Screenshots/VideosAndroid: Native48958_android_native.movAndroid: mWeb Chrome48958_android_web.moviOS: Native48958_ios_native.moviOS: mWeb Safari48958_ios_web.movMacOS: Chrome / Safari48958_web_chrome.movMacOS: Desktop48958_web_desktop.mov |
@brunovjk Are you having issues with the last platforms? |
Great work, @Krishna2323! Everything looks spot on, with just one final detail I’d like to confirm: After confirming an expense, regardless of which one it is—say, keeping an expense from workspace 1 while previewing in workspace 2—where should the "back" button take us? I noticed some inconsistency in my tests, but I'm unsure of the intended behavior. What do you think? I believe we're nearly ready to approve, but I'd like to review this "back after confirming" behavior to avoid regressions. Thanks! |
No. It seems the server encountered some issues, as I didn’t receive the "duplicate error" as expected. I checked The PR is great in my opinion, I think we just need to adjust one last detail :D |
@brunovjk, From what I gather, you're describing the "back" button behavior after confirming an expense. However, I'm not sure if this is directly related to our PR. Could you please share a video that walks through the scenario? It will help me understand the bug a bit better. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-requisites:
- A small screen where the "back button" is visible.
- Workspace 1: All features enabled (tax rate, category, and tag).
- Workspace 2: All features disabled.
Submit 2 expenses with the same value and merchant:
- Expense created in Workspace 1 with some fields filled.
- Expense created in Workspace 2.
Steps:
- Open the expense created in Workspace 1.
- Click the Review Duplicate button.
- Select an expense from Workspace 2.
- Go to the Confirmation page and Confirm the expense.
- Click the "Back button."
Issue:
After clicking the back button, it redirects to a Not Found page.
main |
This PR |
---|---|
bug_main.mov |
bug_48958.mov |
Note: The same bug appears on main
, so it wasn’t introduced or fixed by this PR. I couldn't find any related issues. I’ll approve the PR since the initial issue was resolved, and I leave it to you, @pecanoro, to decide whether to address this in this PR or to report it separately as a new issue. Everything else looks pretty good to me 🚀
@@ -294,8 +294,10 @@ function MoneyRequestPreviewContent({ | |||
|
|||
const navigateToReviewFields = () => { | |||
const backTo = route.params.backTo; | |||
const comparisonResult = TransactionUtils.compareDuplicateTransactionFields(reviewingTransactionID); | |||
Transaction.setReviewDuplicatesKey({...comparisonResult.keep, duplicates, transactionID: transaction?.transactionID ?? ''}); | |||
Transaction.abandonReviewDuplicateTransactions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approved, but now that I think about it, can you add a comment before this line explaining why we need to call Transaction.abandonReviewDuplicateTransactions();
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Clear the draft before selecting a different expense to prevent merging fields from the previous expense
// (e.g., category, tag, tax) that may be not enabled/available in the new expense's policy.
comment added.
Signed-off-by: krishna2323 <[email protected]>
🎉 Merged!! 🎉 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/pecanoro in version: 9.0.59-0 🚀
|
This PR is failing because of issue #52210 |
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.59-3 🚀
|
Details
Fixed Issues
$ #47796
PROPOSAL: #47796 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4