fix: Expense still shown in Submit section after being submitted offline#77957
fix: Expense still shown in Submit section after being submitted offline#77957aldo-expensify merged 3 commits intoExpensify:mainfrom
Conversation
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.
|
|
@bernhardoj 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.mp4Android: mWeb Chromeandroid.mweb.mp4iOS: HybridAppios.mp4iOS: mWeb Safariios.mweb.mp4MacOS: Chrome / Safariweb.mp4 |
|
|
||
| if (actionFromQuery && isValidActionFilter(actionFromQuery)) { | ||
| shouldShow = shouldShow && actionFilterMapping[actionFromQuery](reportItem); | ||
| } |
There was a problem hiding this comment.
I think we should put this all inside the if above (if (queryJSON && !isActionLoading))
JmillsExpensify
left a comment
There was a problem hiding this comment.
Good polish.
Click back button - Verify that the submitted report disappears in Submit section
I agree that this is better UX
|
✋ 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/aldo-expensify in version: 9.2.89-1 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.2.89-6 🚀
|
|
Seems like this caused a regression here #79082 (comment) |
| const actionFilterMapping = { | ||
| [CONST.SEARCH.ACTION_FILTERS.SUBMIT]: expenseStatusActionMapping[CONST.SEARCH.STATUS.EXPENSE.DRAFTS], | ||
| [CONST.SEARCH.ACTION_FILTERS.APPROVE]: expenseStatusActionMapping[CONST.SEARCH.STATUS.EXPENSE.OUTSTANDING], | ||
| [CONST.SEARCH.ACTION_FILTERS.PAY]: expenseStatusActionMapping[CONST.SEARCH.STATUS.EXPENSE.APPROVED], |
There was a problem hiding this comment.
This causes a regression when the policy has Approvals turned off. The reports are ready to be paid, but they're in state=2 and status=2, which filters out the reports ready to be paid.
|
BTW I'm gonna completely revert these changes since we shouldn't be doing this kind of client side filtering on the Search page. It leads to multiple things being out of sync. In my example above, the footer bar still showed the correct values, but the search showed an empty result Revert here #79714 |
|
Thanks for the details Carlos! |
Explanation of Change
Fixed Issues
$ #76519
PROPOSAL: #76519 (comment)
Tests
Offline tests
Same
QA Steps
Same as test
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
Screen.Recording.2025-12-18.at.11.32.00.mov
Android: mWeb Chrome
Screen.Recording.2025-12-18.at.11.33.42.mov
iOS: Native
Screen.Recording.2025-12-18.at.11.36.36.mov
iOS: mWeb Safari
Screen.Recording.2025-12-18.at.11.34.51.mov
MacOS: Chrome / Safari
Screen.Recording.2025-12-18.at.11.30.19.mov