You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-03-24] Workspace settings - Not here page shown when navigate to Per Diem from the workspace editor #80872
Version Number: Reproducible in staging?: Needs Reproduction. The steps described could not be executed ( missing details) Reproducible in production?: Needs Reproduction If this was caught during regression testing, add the test name, ID and link from BrowserStack: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@shawnborton Slack conversation (hyperlinked to channel name): #expensify_bugs
Action Performed:
Prerequisite: Needs account with Collect workspace and Per Diem feature enabled
Please re-state the problem that we are trying to solve in this issue.
When navigating to the Per Diem page on a Collect workspace with the Per Diem feature enabled, users see the "Not here" page instead of the correct Per Diem page.
What is the root cause of that problem?
The root cause is that the WorkspacePerDiemPage (and all related Per Diem pages) use an overly restrictive access check that requires the policy to be a Control policy type:
CONTROL check fails (policy is Collect/TEAM type, not Control/CORPORATE)
Result: Page shows "Not here"
The issue is that CONTROL checks for policy?.type === CONST.POLICY.TYPE.CORPORATE only, which excludes Collect workspaces (policy?.type === CONST.POLICY.TYPE.TEAM).
What changes do you think we should make in order to solve the problem?
Change the access variant from CONTROL to PAID in all Per Diem pages. The PAID variant allows both Collect (TEAM) and Control (CORPORATE) policy types:
Apply the same change to all Per Diem related pages:
WorkspacePerDiemPage.tsx
WorkspacePerDiemDetailsPage.tsx
WorkspacePerDiemSettingsPage.tsx
EditPerDiemAmountPage.tsx
EditPerDiemCurrencyPage.tsx
EditPerDiemDestinationPage.tsx
EditPerDiemSubratePage.tsx
ImportPerDiemPage.tsx
ImportedPerDiemPage.tsx
The featureName={CONST.POLICY.MORE_FEATURES.ARE_PER_DIEM_RATES_ENABLED} check will still ensure that the feature is actually enabled on the workspace, so users won't have access unless arePerDiemRatesEnabled is true.
What alternative solutions did you explore? (Optional)
Keep Per Diem as Control-only: If Per Diem is intended to be a Control-only feature, the fix should be in WorkspaceMoreFeaturesPage.tsx to prevent showing/navigating to Per Diem on Collect workspaces when the feature is somehow enabled. However, this would break existing Collect workspaces that have Per Diem enabled.
Fix at the data level: Ensure arePerDiemRatesEnabled cannot be true for Collect workspaces. This would be a backend change and might break existing data.
The root cause is that the WorkspacePerDiemPage (and all related Per Diem pages) use an overly restrictive access check that requires the policy to be a Control policy type:
Because these conditions are not aligned, the UI may show the entry point for Per Diem even when the user cannot access the page, resulting in a confusing experience.
What changes do you think we should make in order to solve the problem?
Introduce a utility function to centralize access control for feature visibility based on plan level. Example implementation:
constCORPORATE_ONLY_FEATURES: PolicyFeatureName[]=[CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED,CONST.POLICY.MORE_FEATURES.ARE_PER_DIEM_RATES_ENABLED,];// This list can be expanded as needed.functioncanPolicyAccessFeature(policy: OnyxEntry<Policy>,featureName: PolicyFeatureName): boolean{if(!isPaidGroupPolicy(policy)){returnfalse;}if(CORPORATE_ONLY_FEATURES.includes(featureName)){returnisControlPolicy(policy);}returntrue;}
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.38-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@QichenZhu / @truph01 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: N/A. This special requirement was overlooked.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
I don't think there is a reliable way to test this, since it applies only to some old accounts that had Per Diem enabled in a collect workspace before the feature became limited to control policies.
Contributor: @truph01 due $250 via NewDot
Contributor+: @QichenZhu due $250 via NewDot
I don't think there is a reliable way to test this, since it applies only to some old accounts that had Per Diem enabled in a collect workspace before the feature became limited to control policies.
Activity
melvin-bot commentedon Jan 29, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @QichenZhu (
External)melvin-bot commentedon Jan 29, 2026
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.MelvinBot commentedon Jan 29, 2026
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
daledah commentedon Jan 29, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When navigating to the Per Diem page on a Collect workspace with the Per Diem feature enabled, users see the "Not here" page instead of the correct Per Diem page.
What is the root cause of that problem?
The root cause is that the
WorkspacePerDiemPage(and all related Per Diem pages) use an overly restrictive access check that requires the policy to be a Control policy type:App/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx
Lines 409 to 412 in a2f6d72
The
AccessOrNotFoundWrappercombines all access variants with AND logic:App/src/pages/workspace/AccessOrNotFoundWrapper.tsx
Lines 174 to 180 in a2f6d72
The access variants map:
App/src/pages/workspace/AccessOrNotFoundWrapper.tsx
Lines 31 to 34 in a2f6d72
When
accessVariants={[ADMIN, CONTROL]}:ADMINcheck passes (user is admin)CONTROLcheck fails (policy is Collect/TEAM type, not Control/CORPORATE)The issue is that
CONTROLchecks forpolicy?.type === CONST.POLICY.TYPE.CORPORATEonly, which excludes Collect workspaces (policy?.type === CONST.POLICY.TYPE.TEAM).What changes do you think we should make in order to solve the problem?
Change the access variant from
CONTROLtoPAIDin all Per Diem pages. ThePAIDvariant allows both Collect (TEAM) and Control (CORPORATE) policy types:WorkspacePerDiemPage.tsx:
Apply the same change to all Per Diem related pages:
WorkspacePerDiemPage.tsxWorkspacePerDiemDetailsPage.tsxWorkspacePerDiemSettingsPage.tsxEditPerDiemAmountPage.tsxEditPerDiemCurrencyPage.tsxEditPerDiemDestinationPage.tsxEditPerDiemSubratePage.tsxImportPerDiemPage.tsxImportedPerDiemPage.tsxThe
featureName={CONST.POLICY.MORE_FEATURES.ARE_PER_DIEM_RATES_ENABLED}check will still ensure that the feature is actually enabled on the workspace, so users won't have access unlessarePerDiemRatesEnabledis true.What alternative solutions did you explore? (Optional)
Keep Per Diem as Control-only: If Per Diem is intended to be a Control-only feature, the fix should be in
WorkspaceMoreFeaturesPage.tsxto prevent showing/navigating to Per Diem on Collect workspaces when the feature is somehow enabled. However, this would break existing Collect workspaces that have Per Diem enabled.Fix at the data level: Ensure
arePerDiemRatesEnabledcannot be true for Collect workspaces. This would be a backend change and might break existing data.QichenZhu commentedon Jan 29, 2026
This restriction is expected, not the root cause.
truph01 commentedon Jan 29, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
App/src/pages/workspace/WorkspaceInitialPage.tsx
Line 146 in eb7deee
App/src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx
Line 410 in eb7deee
What changes do you think we should make in order to solve the problem?
App/src/pages/workspace/WorkspaceInitialPage.tsx
Line 146 in eb7deee
What alternative solutions did you explore? (Optional)
policy.arePerDiemRatesEnabled(and other features which are only available in control) when downgrading inApp/src/libs/actions/Policy/Policy.ts
Line 5057 in eb7deee
QichenZhu commentedon Jan 29, 2026
@truph01, I can't reproduce this issue. Do you have reliable steps? Another C+ can comment and take over if they can.
27 remaining items
melvin-bot commentedon Mar 17, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 17, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.38-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-03-24. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 17, 2026
@QichenZhu / @truph01 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon Mar 17, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)QichenZhu commentedon Mar 24, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: N/A. This special requirement was overlooked.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
I don't think there is a reliable way to test this, since it applies only to some old accounts that had Per Diem enabled in a collect workspace before the feature became limited to control policies.
mallenexpensify commentedon Mar 24, 2026
Payment Summary
Contributor: @truph01 due $250 via NewDot
Contributor+: @QichenZhu due $250 via NewDot
👍
twisterdotcom commentedon Mar 26, 2026
@QichenZhu has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Not here pageshown when navigate to Per Diem from the workspace editor #80872 (comment).)Zapier Logs
Run ID: 00040eee-0dc9-a695-4b5d-3f75861e6964garrettmknight commentedon May 22, 2026
$250 approved for @truph01