-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[$500] Start Chat - Workspace not auto selected when creating Room for public existing user #34519
Comments
Job added to Upwork: https://www.upwork.com/jobs/~0153cb4ce8578165a7 |
Triggered auto assignment to @kadiealexander ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
ProposalPlease 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
What changes do you think we should make in order to solve the problem?
const [policyID, setPolicyID] = useState(PolicyUtils.getActivePolicies(props.policies).at(0)?.id || null); Currently we are setting it as first policy, we can change to other index if required <InputWrapper
InputComponent={ValuePicker}
inputID="policyID"
label={translate('workspace.common.workspace')}
items={workspaceOptions}
onValueChange={setPolicyID}
value={policyID}
/> What alternative solutions did you explore? (Optional) |
ProposalPlease 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 thats 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 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 const [policyID, setPolicyID] = useState(props.activePolicyID || props.policies[0].id); we can of course use lodash to safely access those the props.policies object |
ProposalPlease 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 Lines 145 to 150 in a4e3ae2
The problem is the value of
These 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 Result34519.mp4What alternative solutions did you explore? (Optional) |
This feature is done here, It seems we need to wait a update from BE |
Closing as a dupe of #32435 |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
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:
Issue found when executing PR #34160
Action Performed:
Prerequisites: Existing public account with existing workspace
Expected Result:
Existing workspace should be automatically selected for Workspace field
Actual Result:
Workspace field is empty
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6343187_1705337737673.2024-01-15_16-50-32.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: