Use compute function for report name in convertIOUReportToExpenseReport#77928
Conversation
…eReport Replace populateOptimisticReportFormula with compute function when converting IOU reports to expense reports. Pass transactions from UI via useOnyx hooks instead of using deprecated getReportTransactions. Changes: - Update convertIOUReportToExpenseReport to accept reportTransactions param - Update moveIOUReportToPolicy to pass reportTransactions - Update moveIOUReportToPolicyAndInviteSubmitter to pass reportTransactions - Update ReportChangeWorkspacePage to use useReportTransactions hook - Update SearchPage to filter and pass transactions - Update BaseKYCWall to use useReportTransactions hook
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.
|
|
@eVoloshchak 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] |
trjExpensify
left a comment
There was a problem hiding this comment.
All good, WN project rollout 👍
|
@abbasifaizan70, should we put this one on HOLD until #77827 is merged? Seems like both PR's are related |
@eVoloshchak, yes, this PR required code changes of this PR. |
The merge-base changed after approval.
|
@abbasifaizan70 I removed the HOLD. When do you think you'll be able to have this ready for another review? |
|
@neil-marcellini @eVoloshchak Can you take a look at this PR? Thanks |
neil-marcellini
left a comment
There was a problem hiding this comment.
Looks great! Only one small non-blocking comment, and then also we should put this behind the beta check.
|
@neil-marcellini removed extra comments. |
@abbasifaizan70, could you add a beta check please? |
|
@eVoloshchak added |
neil-marcellini
left a comment
There was a problem hiding this comment.
It all looks good except for adding a deprecated function call
…ponents using usePermissions
|
@neil-marcellini Solved feedback issue. Thanks |
neil-marcellini
left a comment
There was a problem hiding this comment.
Looks great thanks
|
Next step is for @eVoloshchak to complete the C+ testing and checklist. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-01-21.at.21.51.23.movAndroid: mWeb ChromeScreen.Recording.2026-01-21.at.21.54.08.moviOS: HybridAppScreen.Recording.2026-01-21.at.21.45.39.moviOS: mWeb SafariScreen.Recording.2026-01-21.at.21.47.46.movMacOS: Chrome / SafariScreen.Recording.2026-01-21.at.21.08.20.mov |
It isn't, it is showing "{Workspace} owes -{amount}" until you reconnect cc: @abbasifaizan70 Untitled.mov |
|
The formula won’t run if the app doesn’t yet have the cached beta + policy field data in memory, so it falls back to the default title. Once you go online, the server computes and updates the report name, which is why it changes. ere’s the quickest way to force-enable the beta: Screen.Recording.2026-01-21.at.3.13.44.AM.mov |
…ub.com/abbasifaizan70/Expensify into fix-optimistic-report-name-convert-iou
neil-marcellini
left a comment
There was a problem hiding this comment.
Good to go, thanks for sticking with it.
|
Shoot looks like TS check is failing. Lmk when it's fixed. |
|
@neil-marcellini let me fix typescript Checks issue |
07f93b5 to
1e0af7c
Compare
|
✋ 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/neil-marcellini in version: 9.3.6-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.6-4 🚀
|
Explanation of Change
This PR Replace populateOptimisticReportFormula with compute function when converting IOU reports to expense reports. Pass transactions from UI via useOnyx hooks instead of using deprecated getReportTransactions.
Changes:
Fixed Issues
$ #76855
PROPOSAL: #76855 (comment)
Tests
Prerequisites
{report:type} - {report:total}Report {report:id} - {report:policyname}{report:status} Report for {report:workspacename}{report:type}{report:id}{report:total}{report:policyname}{report:workspacename}{report:status}{report:currency}Test Case 1: Create New Expense in Workspace
Test Case 2: Offline Mode
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Test 01
Test 02
Screen.Recording.2025-12-17.at.7.58.13.PM.mov