add policy to getForExpenseMovedFromSelfDM#86191
Conversation
|
@DylanDylann 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] |
|
No product review needed |
| translate: LocalizedTranslate; | ||
| reportAction: OnyxEntry<ReportAction>; | ||
| policy?: OnyxEntry<Policy>; | ||
| policy: OnyxEntry<Policy>; |
There was a problem hiding this comment.
Policy is missing in some usages of the getReportName function
There was a problem hiding this comment.
@DylanDylann What do you mean? In this PR, we just refactored getForExpenseMovedFromSelfDM
There was a problem hiding this comment.
We need to ensure policy is passed to getForExpenseMovedFromSelfDM in all usages
The call chain is: getReportName → getForReportAction → getMovedFromOrToReportMessage → getForExpenseMovedFromSelfDM
If policy is missing in getReportName, it will also be missing in getForExpenseMovedFromSelfDM
There was a problem hiding this comment.
@DylanDylann but we don't want to make policy required in getReportName here. We'll do it in another PR
| ? getPolicyExpenseChatName({report: rootParentReport}) | ||
| : buildReportNameFromParticipantNames({report: rootParentReport, currentUserAccountID}); | ||
| const policyName = getPolicyName({report: rootParentReport, returnEmptyIfNotFound: true}); | ||
| const policyName = getPolicyName({report: rootParentReport, returnEmptyIfNotFound: true, policy}); |
There was a problem hiding this comment.
One more concern: how do we ensure the child report policy matches the root report policy?
There was a problem hiding this comment.
It's obvious that the child report will have the same policy as the parent report
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-04-01.at.12.48.57.mov |
|
🚧 @lakchote 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/lakchote in version: 9.3.52-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This PR is a purely internal code refactor — it passes a |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.52-9 🚀
|
Explanation of Change
Fixed Issues
$ #66415
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
Screen.Recording.2026-03-24.at.18.26.32.mov