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
[HOLD for payment 2024-07-10] [$250] Workspace - Error page when navigate to Workspace Join link after leaving the workspace #43436
@isabelastisser FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Next, because not found page will be shown for pending delete workspace, we need to add a new check here to make sure the pending action is not delete so we don't get navigated to the not found workspace profile page.
changed the title [-]Workspace - Error page when navigate to Workspace Join link after leaving the workspace[/-][+][$250] Workspace - Error page when navigate to Workspace Join link after leaving the workspace[/+]on Jun 11, 2024
Activity
melvin-bot commentedon Jun 10, 2024
Triggered auto assignment to @isabelastisser (
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.m-natarajan commentedon Jun 10, 2024
@isabelastisser FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
bernhardoj commentedon Jun 11, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The not found page is shown when we reopen the workspace join link after leaving it.
What is the root cause of that problem?
When we successfully leave from a workspace, we still keep the policy object data. It's really weird that the pending action is still
delete.App/src/libs/actions/Policy/Policy.ts
Lines 649 to 660 in 65db650
When we reopen the join link/page, the condition below detects that the workspace exists, thus we are navigated to the profile page.
App/src/pages/workspace/WorkspaceJoinUserPage.tsx
Lines 45 to 51 in 65db650
The not found page will be shown if the policy/workspace has a pending action of delete, thus we see the not found page.
App/src/pages/workspace/WorkspacePageWithSections.tsx
Line 153 in 65db650
What changes do you think we should make in order to solve the problem?
First, we should clear the policy data after successfully leaving a workspace.
Next, because not found page will be shown for pending delete workspace, we need to add a new check here to make sure the pending action is not
deleteso we don't get navigated to the not found workspace profile page.App/src/pages/workspace/WorkspaceJoinUserPage.tsx
Lines 45 to 51 in 65db650
We can optionally check for the policy ID. Let me know if we want to do that
[-]Workspace - Error page when navigate to Workspace Join link after leaving the workspace[/-][+][$250] Workspace - Error page when navigate to Workspace Join link after leaving the workspace[/+]melvin-bot commentedon Jun 11, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0191daed4e48342857
melvin-bot commentedon Jun 11, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)isabelastisser commentedon Jun 14, 2024
@abdulrahuman5196, can you please review the proposal above? Thanks!
51 remaining items
isabelastisser commentedon Jul 10, 2024
@AndrewGable can you please review the regression test proposal? thanks!
JmillsExpensify commentedon Jul 10, 2024
$250 approved for @bernhardoj
isabelastisser commentedon Jul 12, 2024
@AndrewGable #43436 (comment)
AndrewGable commentedon Jul 15, 2024
Yes, looks good
isabelastisser commentedon Jul 15, 2024
All set!