[Payment due @Krishna2323] Remove usage of IOUReportID in IOU actions#87530
Conversation
| const chatReportID = moneyRequestOriginalMessage?.IOUReportID ? report?.chatReportID : reportID; | ||
| // There is no single iouReport for bill splits, so only 1:1 requests require an iouReportID | ||
| const iouReportID = moneyRequestOriginalMessage?.IOUReportID?.toString(); | ||
| children = ( |
There was a problem hiding this comment.
children are always overwritten inside the check below if (report?.type === CONST.REPORT.TYPE.CHAT) {, becase IOU actions are now only displayed in selfDMs (track exenses) or for p2p split bills, and both always have a parent type=chat report. I've also deleted the MoneyRequestAction component completely.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@Beamanator Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Ready again @Krishna2323! |
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required on this one.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_hybrid.mp4Android: mWeb Chromeandroid_mWeb.mp4iOS: HybridAppios_hybrid.mp4iOS: mWeb Safariios_mWeb.mp4MacOS: Chrome / Safariweb_chrome.mp4 |
|
@youssef-lr there are a few failing checks to fix, but otherwise this looks good to me. |
|
On it now |
# Conflicts: # tests/ui/ReportActionItemTest.tsx
… refs Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@carlosmiceli Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🎯 @Krishna2323, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @carlosmiceli 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.4.8-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 I reviewed the changes in this PR and no help site changes are required. This is an internal code cleanup with no user-facing impact:
There are no new features, no UI/label changes, and no @youssef-lr, if you believe a behavior change here is actually surfaced to users and warrants a docs update, let me know which flow and I'll draft the help site PR. |
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.4.8-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.8-3 🚀
|
|
🤖 Payment issue created: #93743 |
Temporary client-side fallback to originalMessage.IOUReportID when resolving the report an IOU action belongs to, restoring behavior removed in PR Expensify#87530. The backend does not reliably send reportID on IOU actions, so resolving purely from reportAction.reportID broke editability (admins/managers could not edit fields on submitted expense reports). Remove once the backend reliably includes reportID. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Explanation of Change
IOUReportID for actions of type
CREATEhas always been identical to thereportIDin the DB column, it's extra data stored for no reason. I'm adding a fallback to useaction?.reportIDwhenever we retrieve IOUReportID. Keeping it in the TS definition though as it is necessary for IOU actions withtype=PAY.I'm also cleaning up some code that assumes we're displaying IOU actions for a transaction from an expense reports. Currently, IOU actions are strictly only displayed for P2P group splits in the chat report, and tracked expenses in the selfDM. Keep this in mind while reviewing!
Fixed Issues
part of https://github.com/Expensify/Expensify/issues/601607
PROPOSAL:
Tests
Offline tests
Same as tests, but offline first, then turn on connection.
QA Steps
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.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari