[Fix] OptionListUtils.getOptions is filtering workspaces chats#21357
Conversation
[Fix] use accountID instead of login [Fix] test revert changes revert changes [Fix] Invalid number of arguments
e59d87b to
af27f77
Compare
| const filteredReports = _.filter(reports, (report) => | ||
| ReportUtils.shouldReportBeInOptionList(report, Navigation.getReportIDFromRoute(), false, currentUserLogin, iouReports, betas, policies), | ||
| ); | ||
| const filteredReports = _.filter(reports, (report) => ReportUtils.shouldReportBeInOptionList(report, Navigation.getReportIDFromRoute(), false, iouReports, betas, policies)); |
There was a problem hiding this comment.
I just removed the extra argument currentUserLogin
|
@narefyev91 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/Videos |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #21313... Please reach out for help on Slack if no one gets assigned! |
|
✋ 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/AndrewGable in version: 1.3.33-0 🚀
|
|
@fedirjh Can you please confirm if we should test this PR on gmail account on step1. Login as a new user who does have a workspace with policy expense beta? Thank you |
@kbecciv expensifail account should be feasible, I think all expensifail have access to all betas including the policy expense. |
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.33-4 🚀
|












Details
In this PR we are fixing a bug where the
OptionListUtils.getOptionsfilters the workspace chats , the root cause is that we are passing invalid number of arguments toReportUtils.shouldReportBeInOptionLisin this lineReportUtils.shouldReportBeInOptionListis used to check if the chat should be in the optionList, passing invalid arguments will make the function returnsfalseregardless of the beta access in this line , since we are passing invalid number of arguments , the betas argument is holding a different value instead of the betas, resulting inPermissions.canUsePolicyExpenseChatreturningfalse.Fixed Issues
$ #21313
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests
Offline tests
Same test
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android