[Payment due @eVoloshchak] Pass managed card context when creating reports - #96503
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.
|
|
@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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppscreen-20260723-233412-1784842394248.mp4Android: mWeb ChromeScreen.Recording.2026-07-23.at.23.24.59.moviOS: HybridAppScreen.Recording.2026-07-23.at.23.22.54.moviOS: mWeb SafariScreen.Recording.2026-07-23.at.23.16.30.movMacOS: Chrome / SafariScreen.Recording.2026-07-23.at.23.12.32.mov |
|
🎯 @eVoloshchak, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
🚧 mountiny 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! 🧪🧪
|
|
✋ 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/mountiny in version: 9.4.45-0 🚀
|
Help site review: no docs changes requiredI reviewed the changes in this PR and no updates are needed to the help site files under Why: This is an internal/backend plumbing change with no user-facing impact:
The end-user flow is unchanged — an admin moving a member's unreported managed-card expense to a new report behaves exactly as before from the UI. There are no new features, buttons, tabs, settings labels, or workflow changes that a help article would document. The help site does not describe this internal domain-derivation logic, so there is nothing to add or correct. Since no documentation changes are required, I did not open a draft docs PR — there is nothing to link or mark
|
|
Hi @ShridharGoel. Could you please explain how to set up a workspace where the workspace admin has a different email domain than the managed-card workspace domain? |
|
Suppose your workspace belongs to domain expensifail.com, then it should have a member whose domain is something else (like example.com). Perform actions as the workspace admin, for the member's unreported card expense. |
|
Hi @ShridharGoel. QA team failed this PR due to an original issue, as the error still appears in the console. 1785190775695.96503-Web.mp4 |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.45-14 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #97376 |
Explanation of Change
Pass the source managed-card transaction ID when an admin creates a report for another member's unreported card expense. This gives the backend trusted context to derive the card's workspace domain instead of using the member's email domain.
Also replace the final positional
createNewReportargument with an options object, keeping report names and managed-card context explicit.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/658595
PROPOSAL:
Tests
Automated:
tests/actions/ReportTest.tsverifiesmanagedCardTransactionIDis included in theCreateAppReportrequest.Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
Screen.Recording.2026-07-20.at.11.24.54.PM.mov