Rename workspaceAccountID to policyAccountID in App#86365
Rename workspaceAccountID to policyAccountID in App#86365miproxy wants to merge 6 commits intoExpensify:mainfrom
Conversation
|
@jjcoffee @chiragsalian One of you needs to 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] |
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97d2e5eac1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
I have read the CLA Document and I hereby sign the CLA |
|
Hi @chiragsalian @MariaHCD — this is a replacement for the previous PR #86293 (PR3 from the plan in Expensify/Expensify#604128) which got locked out due to an authorization issue. The changes are identical — renaming |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@miproxy is backend deployed?
|
heyjennahay
left a comment
There was a problem hiding this comment.
Refactor. Product review not required
Backend just got deployed today like 9 hours ago. |
|
Still not exist yet. Tested against staging backend. |
|
@miproxy can you please look into #86365 (comment) The BE has been deployed for a few days now - but perhaps we are not sending the policyAccountID as the FE expects |
|
@MariaHCD The issue was that Auth wasn't sending policyAccountID in the Onyx updates yet. I've addressed this in |
3e11dcb to
23f4394
Compare
No, this doesn't need to wait for the Auth PR. There are two fallbacks in place: Web-Expensify already accepts both policyAccountID and workspaceAccountID as API parameters, and the App has a policyAccountID ??workspaceAccountID fallback for reading from Onyx (to handle cached data that doesn't have policyAccountID yet). Auth #20807 just ensures the backend starts populating policyAccountID in Onyx updates — nothing breaks without it. Once all 3 PRs are merged, I'll open a cleanup PR to remove the fallbacks. |
|
Is this ready for review? job 6 test failing |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
1b6673c to
3737e6d
Compare
Updates all Policy field accesses, API parameter objects, types, and tests to use policyAccountID. The wire-format key sent to the server is now policyAccountID, relying on Web-Expensify PR2 supporting both params.
Updates three test files that were missed in the initial rename (useIsAllowedToIssueCompanyCard, useAccountTabIndicatorStatus, useIndicatorStatus) and fixes prettier formatting in StatementCloseDateStep.
…untID fallback, fix test mocks
…nflict resolution
3737e6d to
9139fde
Compare
|
@chiragsalian , @MariaHCD, @situchan - #2087 has been deployed. Is there anything else I should do to help move this issue forward? |
|
Still I am not seeing |
|
@situchan I see both the workspaceAccountID and the policyAccountID in the policy Onyx object:
|
|
I see it now in recently created account but still not in old account created a few years ago. |
Just it being deployed should suffice.
No i don't believe so. Did you do a fresh log into this old account? Can you figure out some test steps to share. |
|
yes I fresh logged in. policyID: F151E60B77A363F8 (Still not exist even on owner (situchandrashil7+a1@gmail.com) account)
|
|
@miproxy could you checkout the above comments? Perhaps we are missing some more places where we need to send the new key like Chirag pointed out. |
|
@situchan , @MariaHCD This was caused by Changes are in PR: https://github.com/Expensify/Web-Expensify/pull/52214 cc: @chiragsalian |



Explanation of Change
Renames the
workspaceAccountIDproperty topolicyAccountIDacross the App codebase. This is part of a broader refactor (Expensify/Expensify#604128) to align naming conventions so that all WORKSPACE_ACCOUNT constants/fields use POLICY_ACCOUNT naming instead.Changes include updating all usages in hooks, actions, pages, components, API parameter types, and tests.
Fixed Issues
$ #86364
PROPOSAL: https://github.com/Expensify/Expensify/issues/604128#issuecomment-4071620594
Tests
Offline tests
N/A — this is a pure rename refactor with no behavioral changes.
QA Steps
[No QA] — Pure rename refactor, no user-facing behavioral changes.
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)Avatar, 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