Refactor putOnhold to use the useAncestors() hook.#74628
Refactor putOnhold to use the useAncestors() hook.#74628luacmartins merged 24 commits intoExpensify:mainfrom
putOnhold to use the useAncestors() hook.#74628Conversation
- Introduced `getAncestors` function to traverse report hierarchy and fetch ancestor reports and actions. - Updated `putOnHold` and `putTransactionsOnHold` functions to accept ancestor data. - Integrated `useTransactionsAncestors` hook in `SearchHoldReasonPage` to retrieve ancestors for selected transactions.
…mport in IOU actions
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.
|
…nction to provide default value for ancestors
|
Hey @luacmartins and @FitseTLT, if a report has multiple transactions. Since the report will still have no new hold comments, expect the transaction thread. We are supposed to update the report's parent action. E.g.: |
|
@Tony-MK sorry, I'm not sure that I understood your comment. Could you please list the steps to reproduce the issue you're referring to? |
|
This is after holding and unholding a singular expense, then adding another expense to the report. Mutiple.Transactions.movShould the reply count change like holding a single expense? I believe it should not update the |
|
@Tony-MK isn't the visible comment in the transaction thread? |
This comment was marked as resolved.
This comment was marked as resolved.
|
Apologies, this is a bug that has been happening since staging because |
… and update dev server host
…r support and optimizing report name parsing
…emove unused parameters
|
Hey @luacmartins, could we create an issue for #74628 (comment)? I already started a draft PR. Thanks |
ok, makes sense |
|
Updated the test case. |
|
Please merge main |
|
Expense thread after creating new expense seems broken on main Screen.Recording.2025-11-20.at.2.14.14.AM.movHad to test with old expenses |
|
Let me look into it. |
|
Pretty bad regression. I see it's reported as deploy blocker - #75565 |
|
Another bug happening on main: duplicated/unnecessary report preview shows in transaction thread when offline. disappears after online Screen.Recording.2025-11-20.at.2.55.46.PM.mov |
situchan
left a comment
There was a problem hiding this comment.
Above bugs are not caused by this PR
|
✋ 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/luacmartins in version: 9.2.62-0 🚀
|
|
I'm pretty sure this PR caused this blocker. After confirming the behavior in my local Android simulator, I reverted this PR and I was able to hold the expense from the Reports screen drop down. |
|
@Tony-MK please check ^ |
[CP Staging] Revert "Merge pull request #74628 from Tony-MK/putOnHold"
| context.clearSelectedTransactions(true); | ||
| } else { | ||
| holdMoneyRequestOnSearch(context.currentSearchHash, Object.keys(context.selectedTransactions), comment, allTransactions, allReportActions); | ||
| holdMoneyRequestOnSearch(context.currentSearchHash, context.selectedTransactionIDs, comment, allTransactions, allReportActions); |
There was a problem hiding this comment.
Looks like you reverted this change in new PR.
What was this change for and why did it cause the issue?
There was a problem hiding this comment.
The issue was that the context was not available because of https://github.com/Expensify/App/pull/75833/files#r2554436669.
There was a problem hiding this comment.
ok you answered to why did it cause the issue?
Now what was this change for?
There was a problem hiding this comment.
@Tony-MK anything that I can help with to move this forward?
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.62-5 🚀
|
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.2.63-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.2.63-8 🚀
|
Explanation of Change
Fixed Issues
$ #73566
PROPOSAL:
Tests
Force Offline.Force Offline.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.-.Native.webm
Android: mWeb Chrome
Android.-.mWeb.webm
iOS: Native
iOS.-.mWeb.mp4
iOS: mWeb Safari
iOS.-.Native.mp4
MacOS: Chrome / Safari
macOS.-.Chrome.mov
MacOS: Desktop
macOS.-.Desktop.mov