Updates to leave or remove from workspace workflows#58345
Updates to leave or remove from workspace workflows#58345MonilBhavsar merged 85 commits intoExpensify:mainfrom
Conversation
|
@huult there are conflicts. If you could please fix |
…ve-workspace-restrictions
|
@MonilBhavsar it's done |
|
Thank you! |
…ve-workspace-restrictions
…ve-workspace-restrictions
MonilBhavsar
left a comment
There was a problem hiding this comment.
I see you have added TECHNICAL_CONTACT as a new Onyx key. But it's not an onyx key. It's just an object key in policy_ Onyx collection
|
@MonilBhavsar thanks, i will update it |
|
@MonilBhavsar Is your PR already merged? |
|
Yes, it was deployed |
…ve-workspace-restrictions
…ve-workspace-restrictions
…ve-workspace-restrictions
|
I've finished implementing the code for this ticket and tested some cases, but I'm not sure how to test the ones listed below. Could you help me? For the tests I've completed, you can refer to the If the person being removed is the preferred exporter, prompt with an alert modal warning on clicking Remove from workspace.
If the person being removed is the reimburser, prompt with an alert modal warning on clicking Remove from workspace.
If the person trying to leave is the reimburser, prompt with an alert modal warning on clicking Leave
If the person being removed has an outstanding processing report to action on:
If the person trying to leave has an outstanding processing report to action on:
If the person trying to leave is the preferred exporter, prompt with an alert modal warning on clicking Leave
If the person trying to leave is the reimburser, prompt with an alert modal warning on clicking Leave |
You'll need to connect a workspace to an integration, like QBO, and set a user as the preferred exporter in the settings. Then, try to remove that user, or leave. @shubham1206agra is the C+ on the issue to this PR, perhaps he can help here.
You'll need to add a business bank account to the workspace in Workflows, and set a user as the reimburser in the settings once connected. Then, try to remove that user, or leave. You can use the test credentials from here.
Have userA submit a report to userB, then as userB try to leave the workspace or remove userB from the workspace. |
|
@trjExpensify thank you so much |
@huult Send me your email and I will add you to a workspace |
…ve-workspace-restrictions
Pass (without default approver) Note @trjExpensify How do we need to handle default approver? As for this case, leave button is disabled before this PR. Note @MonilBhavsar OpenApp is not sending default approver + approver workflow in the policy data. Can you please fix this?
Pass Screen.Recording.2025-10-30.at.9.31.36.PM.mov
Note @MonilBhavsar OpenApp is not sending reimburser in the policy data. Can you please fix this?
Note @MonilBhavsar OpenApp is not sending technical contact in the policy data. Can you please fix this?
Note @MonilBhavsar OpenApp is not sending preferred exporter in the policy data. Can you please fix this?
|
If the default approver is the workspace owner, they can't leave/be removed. If it's not, then it's this one and we set the workspace owner as the default approver:
|
…ve-workspace-restrictions
…ve-workspace-restrictions
Reviewer Checklist
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 9.2.42-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.2.42-11 🚀
|
| expenseReports: 'Informes de Gastos', | ||
| rateOutOfPolicy: 'Tasa fuera de póliza', | ||
| leaveWorkspace: 'Salir del espacio de trabajo', | ||
| leaveWorkspaceConfirmation: 'Si sales de este espacio de trabajo, no podrás enviar gastos en él', |
| policy?.connections?.quickbooksDesktop?.config?.export?.exporter, | ||
| policy?.connections?.quickbooksOnline?.config?.export?.exporter, | ||
| policy?.connections?.xero?.config?.export?.exporter, | ||
| policy?.connections?.netsuite?.options.config.exporter, |
There was a problem hiding this comment.
👋 Hey, coming from #74903.
This has caused a crash when trying to connect to NetSuite with incorrect credentials, we were missing optional chaining for netsuite exporter
policy?.connections?.netsuite?.options?.config?.exporter,












Details
Fixed Issues
$ #56750
PROPOSAL: N/A
Tests
Same QA step
Offline tests
QA Steps
Leaving a workspace
Set up cases:
Precondition: Member A is an Admin and invites Member B to the workspace with the role Member.
Steps:
Precondition: Member A is an Admin and invites Member B to the workspace with the role Auditor.
Steps:
Precondition: Member A is an Admin and invites Member B to the workspace with the role Admin.
Steps:
Precondition:
Steps:
Precondition:
#56750 (comment)
Steps:
Precondition:
Steps:
Precondition:
Steps:
Precondition:
Steps:
Removing someone from a workspace
Precondition:
Precondition:
Precondition:
Precondition:
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-05-13.at.12.53.10.mp4
Screen.Recording.2025-05-13.at.12.54.29.mp4
Screen.Recording.2025-05-13.at.12.56.40.mp4
Screen.Recording.2025-05-13.at.12.58.37.mp4
If the person trying to leave is the technical contact, prompt with an alert modal warning on clicking Leave
Screen.Recording.2025-05-13.at.13.10.03.mp4
Screen.Recording.2025-05-22.at.11.24.58.mov
Screen.Recording.2025-05-22.at.11.29.07.mp4
Screen.Recording.2025-07-02.at.12.42.08.mov
Screen.Recording.2025-07-02.at.12.41.55.mov
Screen.Recording.2025-05-22.at.11.06.27.mov
Screen.Recording.2025-05-22.at.11.05.32.mov
Screen.Recording.2025-05-13.at.13.18.28.mp4
Screen.Recording.2025-05-13.at.13.38.22.mp4
Skip
MacOS: Desktop