Fix delete option is missing from report details page after split and delete one of the splits - #75953
Conversation
|
@thesahindia 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] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Reviewer Checklist
Screenshots/VideosAndroid: mWeb Chrome |
dangrous
left a comment
There was a problem hiding this comment.
Logic looks fine, let's just update the comment to make more sense, and can we also add tests for this? Not sure if there are existing ones but should be good to catch all the possible options for getOneTransactionThreadReportAction, if only to appease the code coverage bot
| actionType && | ||
| iouRequestTypesSet.has(actionType) && | ||
| !!originalMessage?.IOUTransactionID && | ||
| // Include deleted IOU reportActions if: |
There was a problem hiding this comment.
we should update this comment since we're now checking that the actions are NOT deleted below.
There was a problem hiding this comment.
Updated the comment
|
Added unit test. |
|
I'm going to go ahead and merge this, but GH question - why did the new changes @bernhardoj added after my review not reset @thesahindia's review? It was just comments and tests so there's no issue in this case, but I would think it should trigger a new review from the C+... |
|
✋ 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/dangrous in version: 9.2.67-0 🚀
|
|
🚀 Deployed to staging by https://github.com/dangrous in version: 9.2.70-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.70-0 🚀
|




Explanation of Change
When we delete one of the splits, the deleted IOU action is still included when deciding whether it's a one-transaction report or not. This PR filters out the deleted action.
Fixed Issues
$ #74741
PROPOSAL: #74741 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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