Revert "Fix: Duplicate review tax code page shows no options across workspaces" - #81750
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3884e4324e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reviewDuplicates?.reportID ?? route.params.threadReportID}`, {canBeMissing: true}); | ||
| const policy = usePolicy(report?.policyID); | ||
| const transactionID = getTransactionID(report); | ||
| const [transaction] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION}${getNonEmptyStringOnyxID(transactionID)}`, {canBeMissing: true}); | ||
| const [transactionViolations] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`, { |
There was a problem hiding this comment.
Use thread report for transaction ID lookup
When reviewDuplicates?.reportID is set, this hook now loads the expense report instead of the thread report. getTransactionID() only resolves an IOU transaction ID for thread reports (it checks isThread and reads the parent report action), so for an expense report it returns undefined. That means the subsequent TRANSACTION/TRANSACTION_VIOLATIONS Onyx keys are built with undefined, leaving transactionViolations empty and compareDuplicateTransactionFields without data. This breaks the tax code review flow (e.g., no options rendered) whenever reviewDuplicates is present, which is the common path for duplicate review. Consider keeping route.params.threadReportID for the report used to derive transactionID, as other review screens do.
Useful? React with 👍 / 👎.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…w-tax-code-report-id Revert "Fix: Duplicate review tax code page shows no options across workspaces" (cherry picked from commit ff12415) (cherry-picked to staging by marcaaron)
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.3.15-7 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.15-10 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/marcaaron in version: 9.3.16-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.16-9 🚀
|
Reverts #81079
Fixes Deploy Blocker: #81628
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.