fix: New workflow is not added via Import Spreadsheet in a control WS#82075
fix: New workflow is not added via Import Spreadsheet in a control WS#82075nkdengineer wants to merge 5 commits intoExpensify:mainfrom
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 238178c18d
ℹ️ 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".
| ); | ||
| const onyxData = updateImportSpreadsheetData(added, updated); | ||
|
|
||
| const shouldUpdateApprovalMode = members.some((member) => !!member.submitsTo || !!member.forwardsTo) && isControlPolicy(policy); |
There was a problem hiding this comment.
Derive approval mode from the imported workflow shape
When a control workspace imports members whose submitsTo all point at the default approver, this branch still forces approvalMode to ADVANCED just because at least one row has submitsTo. That disagrees with the app's own workflow derivation: convertPolicyEmployeesToApprovalWorkflows() keeps that case as a single default workflow, and WorkspaceWorkflowsPage only treats the workspace as advanced when there are multiple workflows or multiple approvers. As a result, a basic workspace can be promoted to advanced after import, which changes how the workflows UI and approval behavior interpret the policy even though the imported employee list still represents only the default workflow.
Useful? React with 👍 / 👎.
JmillsExpensify
left a comment
There was a problem hiding this comment.
Fix aligns with intended product behavior.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppCleanShot.2026-03-21.at.15.17.23.6.mp4Android: mWeb ChromeCleanShot.2026-03-21.at.15.14.57.5.mp4iOS: HybridAppCleanShot.2026-03-21.at.15.11.45.mp4iOS: mWeb SafariCleanShot.2026-03-21.at.15.11.45.3.mp4MacOS: Chrome / SafariCleanShot.2026-03-20.at.21.41.10.2.mp4 |
|
@nkdengineer Have you encountered this issue when import on policy control being flaky on the web platform? CleanShot.2026-03-21.at.15.12.52-bug.4.mp4 |
|
@mollfpr Could you please help verify this error message from the backend? It’s flaky to reproduce when importing members into a collection workspace then remove member
bug-import-collection-policy.mp4The current solution updating the approval mode to ADVANCED when importing members—doesn’t work for collection workspaces. @JmillsExpensify Which specific behavior do we need to handle in this case? CleanShot.2026-03-21.at.15.36.36.1.mp4 |
|
@mollfpr @JmillsExpensify Can you please check the comment above? |
It's confirmed we got the approval upgrade |
|
Ok so reviewing where we are at, I think we should not set the |
|
@Expensify/product-pr thoughts on that approach? We should make sure we're aligned on how to handle CSV import upgrade cases in general. |
We’re still waiting for @Expensify/product-pr to confirm whether importing a CSV that includes forwardsTo or submitsTo field should show the upgrade RHP confirmation. |
|
I bumped them |
|
That handle doesn't tag anyone. Use the |
|
Is this accurate on how Classic handles importing a CSV of members and their approval workflow in this regard? Collect workspace
Control workspaces
|
|
@JmillsExpensify, can you please confirm if here is the expected behavior we want. |
Explanation of Change
fix: New workflow is not added via Import Spreadsheet in a control WS
Fixed Issues
$ #80428
PROPOSAL: #80428 (comment)
Tests
Offline tests
None
QA Steps
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Screen.Recording.2026-03-18.at.14.18.42.mov
Android: mWeb Chrome
Screen.Recording.2026-03-18.at.14.20.01.mov
iOS: Native
Screen.Recording.2026-03-18.at.14.22.20.mov
iOS: mWeb Safari
Screen.Recording.2026-03-18.at.14.16.00.mov
MacOS: Chrome / Safari
Screen.Recording.2026-03-18.at.14.12.19.mov