-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD #27510][$500] Dev: Web - Selecting a workspace selects other (all) workspaces as well #27588
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01dd4d5419ef8224cd |
Triggered auto assignment to @mallenexpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @robertKozik ( |
Proposal by: @BhuvaneshPatil ProposalPlease re-state the problem that we are trying to solve in this issue.Selecting a workspace selects other (all) workspaces as well What is the root cause of that problem?While calculating App/src/components/OptionsList/BaseOptionsList.js Lines 176 to 186 in 76c1559
We check for accountID only, as workspace chats/reports have accountID 0. What changes do you think we should make in order to solve the problem?
if (option.accountID && option.accountID === item.accountID) return true
if (option.reportID && option.reportID === item.reportID) return true What alternative solutions did you explore? (Optional) |
This is a duplicate of #27510. |
Not a dupe, that's about showing workspace details and this one is about multiple workspaces being selected. Both have different RCA and solutions as well |
ProposalPlease re-state the problem that we are trying to solve in this issue.Selecting a workspace selects other (all) workspaces as well What is the root cause of that problem?Upon searching i found that value of isSelected is only based on accountID, as all workspace have accountId as 0 its causing the issue. Which results in selecting all the workspaces. [App/src/components/OptionsList/BaseOptionsList.js] const isSelected = _.some(selectedOptions, (option) => {
if (option.accountID === item.accountID) {
return true;
}
if (_.isEmpty(option.name)) {
return false;
}
return option.name === item.searchText;
}); What changes do you think we should make in order to solve the problem?Instead of searching with accountID we need to search with reportID only as reportID is different for everything. We have to pass reportID here [App/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js] newSelectedOptions = [...participants, {accountID: option.accountID, login: option.login, selected: true, reportID: option.reportID}]; and need to change this to const isSelected = _.some(selectedOptions, (option) => {
if (option.reportID === item.reportID) {
return true;
}
if (_.isEmpty(option.name)) {
return false;
}
return option.name === item.searchText;
}); What alternative solutions did you explore? (Optional)N/A |
@BhuvaneshPatil, do you know why, when you click split with a workspace, you get this blank account that shows up? I noticed in your screenvid and it shows for me too |
@mallenexpensify This is known issue - #27510 |
Thanks @BhuvaneshPatil , I was unable to reproduce, going to put this on hold pending |
@mallenexpensify I think I mis-understood with what you have said. To reproduce this issue we need more than 1 workspace. When we select a workspace, notice is shows check icon for all the workspaces Can you try this one? |
I was mentioning about the workspace detail not showing in selected participant, that is the issue linked. |
@BhuvaneshPatil I believe selected proposal in #27510 will address this issue as well |
Above closed and I'm unable to reproduce this so I'm closing 2023-10-04_10-28-07.mp4 |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Only selected workspace should be selected
Actual Result:
All workspaces are selected
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: Dev 1.3.70-5
Reproducible in staging?: no
Reproducible in production?: no
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
Notes/Photos/Videos: Any additional supporting documentation
Screen.Recording.2023-09-15.at.6.02.36.PM.mov
Expensify/Expensify Issue URL:
Issue reported by: @BhuvaneshPatil
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694781139958309
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: