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 2025-12-17] [$250] Advanced Approval workflow can be set via import Member on the Collect plan #69362
Version Number: v9.1.98-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#65398 Issue reported by: Applause Internal Team Device used: Windows 11 / Chrome, Android 13 / Xiaomi Poco F5, Chrome / Android 13, mac OS 14.5 / MacBook Air 2020, iOS 15.8.3 / iPhone 7 Plus App Component: Other
Action Performed:
Prerequisite:
Prepare the CSV file that has 2 approvers
Create a new workspace with the Collect plan
Go to Members > click More > Import spreadsheet
Choose the CSV file that already prepared
Click Import and dismiss the Import successful modal
Go to Workflows and check the workspace still as Collect plan
Expected Result:
Workflow settings should not be updated when the CSV has advanced approvals uploaded to import Member option on the Collect plan WS, or the workspace plan should be auto-upgraded to the Control plan
Actual Result:
Advanced Approval workflow can be set via import Member on the Collect plan workspace without upgrading to the Control plan
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
/** The email of the member who approves this member's expenses */
submitsTo: string;
but we are not checking if submitsTo is not the default approver and this is collect policy then we are sending all the submitsTo params to the Back End
What changes do you think we should make in order to solve the problem?
We should check the data before sending it to Back End.
Here we will check if there is a submitsTo that is not the default approver and this is collect policy then we will redirect the user to the upgrade workspace route before continuing to import members by
Define the 2 new states and the confirm modal in ImportedMembersPage component
const [shouldShowUpgradeModal, setShouldShowUpgradeModal] = useState(false);
const [isUpgradeModalShown, setIsUpgradeModalShown] = useState(false);
...
<ConfirmModal
isVisible={isUpgradeModalShown}
title={'Before you go'}
prompt={'You are importing multiple approvers so you will have to upgrade your workspace to access this feature'}
onConfirm={() => {
setIsUpgradeModalShown(false);
setShouldShowUpgradeModal(false);
Navigation.navigate(
ROUTES.WORKSPACE_UPGRADE.getRoute(
policyID,
CONST.UPGRADE_FEATURE_INTRO_MAPPING.approvals.alias,
Navigation.getActiveRoute(),
),
);
}}
onCancel={() => {
setIsUpgradeModalShown(false);
setShouldShowUpgradeModal(false);
Navigation.goBack(ROUTES.WORKSPACE_MEMBERS.getRoute(policyID));
}}
/>
When the user click import button, we'll show the confirm modal
if (shouldShowUpgradeModal) {
setIsUpgradeModalShown(true);
return;
}
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Historically, you have always been able to import a spreadsheet with an advanced workflow into a Collect workspace on Classic, it just doesn't affect the workflow.
Yeah @RachCHopkins, I personally think if user uploads the file that contains Advanced approval workflow, BE should either remove the invalid options automatically based on the WS status OR upgrade the WS
@RachCHopkins In my opinion, when a user uploads a file that contains Advanced approval workflow, we should create a pop up notification that it needs to upgrade to control workspace. Can you tag the design team here so we can know expected?
Activity
melvin-bot commentedon Aug 27, 2025
Triggered auto assignment to @RachCHopkins (
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.aadil42 commentedon Aug 27, 2025
How do we do this?
Prepare the CSV file that has 2 approvers
you say 'the CSV' file is this a specific file? can we get it in the OP?
Thank you.
Eskalifer1 commentedon Aug 27, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Advanced Approval workflow can be set via import Member on the Collect plan
What is the root cause of that problem?
At the moment, we have no logic for checking whether we have Advanced approvals and what type of Workspace we have.
What changes do you think we should make in order to solve the problem?
We need to add useEffect, which will check whether Workspace has Advanced approvals and is not of the controll type, and if so, update it:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
lorretheboy commentedon Aug 27, 2025
I think this should be automatically handled by BE, we shouldn't move this logic to FE side
Eskalifer1 commentedon Aug 27, 2025
I agree with my @lorretheboy, it's best to do this from the backend.
daledah commentedon Aug 27, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Advanced Approval workflow can be set via import Member on the Collect plan workspace without upgrading to the Control plan
What is the root cause of that problem?
We are defining the
SubmitTofield as the member who approvesApp/src/types/onyx/ImportedSpreadsheetMemberData.ts
Lines 9 to 10 in 4d9a36c
but we are not checking if
submitsTois not the default approver and this is collect policy then we are sending all thesubmitsToparams to the Back EndApp/src/pages/workspace/members/ImportedMembersPage.tsx
Lines 139 to 144 in 6ce20f3
What changes do you think we should make in order to solve the problem?
We should check the data before sending it to Back End.
Here we will check if there is a
submitsTothat is not the default approver and this is collect policy then we will redirect the user to the upgrade workspace route before continuing to import members byImportedMembersPagecomponentWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
daledah commentedon Aug 27, 2025
To make testing easier here is my branch and the result
result.mp4
RachCHopkins commentedon Aug 28, 2025
Historically, you have always been able to import a spreadsheet with an advanced workflow into a Collect workspace on Classic, it just doesn't affect the workflow.
RachCHopkins commentedon Aug 28, 2025
I can see on New Expensify it does alter the workflow.
Classic:
New:
So what should be happening is that the advanced workflow does not apply.
@lorretheboy does that line up with your understanding, and your feeling that this is BE?
lorretheboy commentedon Aug 28, 2025
Yeah @RachCHopkins, I personally think if user uploads the file that contains Advanced approval workflow, BE should either remove the invalid options automatically based on the WS status OR upgrade the WS
daledah commentedon Aug 28, 2025
@RachCHopkins In my opinion, when a user uploads a file that contains Advanced approval workflow, we should create a pop up notification that it needs to upgrade to control workspace. Can you tag the design team here so we can know expected?
RachCHopkins commentedon Aug 28, 2025
@Expensify/design what do you guys think?
FYI everyone, I will be OOO from later today and all next week, if this needs a new BZ in that time, please remove me and add the Bug label again.
105 remaining items
trjExpensify commentedon Jan 19, 2026
Thanks! We had the one regression right? #76420
trjExpensify commentedon Jan 27, 2026
Bump @sobitneupane.
trjExpensify commentedon Feb 2, 2026
Bump @sobitneupane
sobitneupane commentedon Feb 3, 2026
@trjExpensify I think there were at least three regressions, right @nkdengineer?
nkdengineer commentedon Feb 3, 2026
We only have one regression. It's reverted the first time due to the lint error
trjExpensify commentedon Feb 5, 2026
Okay, so payment summary as follows:
Both paid via NewDot. Go ahead and request!
twisterdotcom commentedon Feb 25, 2026
@nkdengineer has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-db12-a002-910c-d22b52b01d04garrettmknight commentedon Mar 16, 2026
$125 approved for @sobitneupane