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
[$500] Start Chat - Workspace not auto selected when creating Room for public existing user #34519
Version Number: 1.4.25-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
changed the title [-]Start Chat - Workspace not auto selected when creating Room for public existing user[/-][+][$500] Start Chat - Workspace not auto selected when creating Room for public existing user[/+]on Jan 15, 2024
Activity
[-]Start Chat - Workspace not auto selected when creating Room for public existing user[/-][+][$500] Start Chat - Workspace not auto selected when creating Room for public existing user[/+]melvin-bot commentedon Jan 15, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0153cb4ce8578165a7
melvin-bot commentedon Jan 15, 2024
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 15, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (
External)BhuvaneshPatil commentedon Jan 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Start Chat - Workspace not auto selected when creating Room for public existing user
What is the root cause of that problem?
we are not initialising any value for policyID in
WorkspaceNewRoomPage. We are setting it as null.App/src/pages/workspace/WorkspaceNewRoomPage.js
Line 103 in a4e3ae2
What changes do you think we should make in order to solve the problem?
Currently we are setting it as first policy, we can change to other index if required
2. use that value in
InputWrapperforpolicyWhat alternative solutions did you explore? (Optional)
abzokhattab commentedon Jan 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace not auto selected when creating Room for public existing user
What is the root cause of that problem?
The backend doesn't return the
account.activePolicyIDhttps://github.com/Expensify/App/blob/a4e3ae2546882b0971ed80e6ce0fd4c6b85cf956/src/pages/workspace/WorkspaceNewRoomPage.js#L369C2-L373C11thats why the displays empty workspace
What changes do you think we should make in order to solve the problem?
either this issue is fixed in the backend,
or we add a fallback to select the first workspace if the
account.activePolicyIDis not returned:if we go with this approach then we need to change this https://github.com/Expensify/App/blob/a4e3ae2546882b0971ed80e6ce0fd4c6b85cf956/src/pages/workspace/WorkspaceNewRoomPage.js#L103C5-L103C5
to
we can of course use lodash to safely access those the props.policies object
dummy-1111 commentedon Jan 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace isn't auto selected in creating room page even when there are active workspaces
What is the root cause of that problem?
We have two code segments to initialize the workspace value
App/src/pages/workspace/WorkspaceNewRoomPage.js
Line 103 in a4e3ae2
App/src/pages/workspace/WorkspaceNewRoomPage.js
Lines 145 to 150 in a4e3ae2
The problem is the value of
activePolicyID. There may be 2 casesactivePolicyIDis emptyactivePolicyIDisn't included in active policiesThese cases were not handled. This is the root cause
What changes do you think we should make in order to solve the problem?
We need to handle the above 2 cases
This works as expected
Result
34519.mp4
What alternative solutions did you explore? (Optional)
DylanDylann commentedon Jan 16, 2024
This feature is done here, It seems we need to wait a update from BE
cc @alitoshmatov @s-alves10
kadiealexander commentedon Jan 19, 2024
Closing as a dupe of #32435