Pass policyID when issuing physical Expensify Cards#91843
Conversation
The physical card branch in issueExpensifyCard() was not including policyID in the API parameters, causing Bedrock to resolve the workspace from domainAccountID instead of using the active policy. This led to users being auto-invited to the wrong workspace. Co-authored-by: Maxence Coulibaly <madmax330@users.noreply.github.com>
|
All checks on this PR are currently passing. There are no failing checks to fix — every check shows either ✅ |
|
Goes with: https://github.com/Expensify/Auth/pull/21887 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @madmax330 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/madmax330 in version: 9.3.89-1 🚀
Bundle Size Analysis (Sentry): |
Help site reviewI reviewed the changes in this PR and no help site updates are required. Why:
The help site articles under No draft PR will be created since no documentation updates are required. |
Explanation of Change
When issuing a physical Expensify Card,
issueExpensifyCard()was not includingpolicyIDin the API parameters sent viaCREATE_EXPENSIFY_CARD. The virtual card branch (CREATE_ADMIN_ISSUED_VIRTUAL_CARD) already correctly includedpolicyID. This caused Bedrock to resolve the workspace fromdomainAccountIDinstead of using the active policy, which led to card assignees being auto-invited to the wrong workspace.This one-line fix adds
policyIDto the physical card API call parameters, matching the virtual card behavior.Depends on Auth PR that removes the mutual exclusion check between
policyIDanddomainAccountIDinCreateExpensifyCard.cpp.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/636080
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
// TODO
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
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