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 2023-08-16] [$1000] Web - New group can't search an email if it's a substring of a selected email #23503
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.43-7 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 Notes/Photos/Videos: Any additional supporting documentation
Please re-state the problem that we are trying to solve in this issue.
New group can't search an email if it's a substring of a selected email.
What is the root cause of that problem?
The root cause of this issue is that we concat logins of selected options to a string filterText and check by !filterText.includes(login) if a login is unselected, which is wrong, see below snippet
What changes do you think we should make in order to solve the problem?
To fix this issue, we can save logins of selected options to an array selectedLogins and use method !_.contains(selectedLogins, login) to check if a login is unselected.
changed the title [-]Web - New group can't search an email if it's a substring of a selected email[/-][+][$1000] Web - New group can't search an email if it's a substring of a selected email[/+]on Jul 25, 2023
We are filtering selected options based on filterText, so in this case abcde@gmail.com.include('bcde@gmail.com') will be true and bcde@gmail.com will not be displaced
What changes do you think we should make in order to solve the problem?
when calling getNewChatOptions, we should pass selectedOptions params as 5th param. And then we don't need this logic to filter
we can see the problem (!filterText.includes(filteredUserToInvite.login)). This will match every possible combination.
What changes do you think we should make in order to solve the problem?
Since filteredUserToInvite as well as selectedOptions both have the unique login property, it is possible to check if at least one element of the selectedOptions has a login identifier thats equal to filteredUserToInvite.login. If that is not the case, we can show the filteredUserToInvite.
What alternative solutions did you explore? (Optional)
changed the title [-][$1000] Web - New group can't search an email if it's a substring of a selected email[/-][+][HOLD for payment 2023-08-16] [$1000] Web - New group can't search an email if it's a substring of a selected email[/+]on Aug 9, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.51-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-08-16. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
For reference, here are some details about the assignees on this issue:
The PR that introduced the bug has been identified. Link to the PR:
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
Determine if we should create a regression test for this bug.
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
No. Regression test won't be beneficial for this minor test case.
Reconfirming that because there were no regressions and the PR review was held up on an Expensifier, and there were no major revisions suggested on the PR, I think this issue qualifies for an urgency bonus. This makes payments:
Activity
melvin-bot commentedon Jul 24, 2023
Triggered auto assignment to @sophiepintoraetz (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 24, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)kbecciv commentedon Jul 24, 2023
Proposal
@eh2077
Please re-state the problem that we are trying to solve in this issue.
New group can't search an email if it's a substring of a selected email.
What is the root cause of that problem?
The root cause of this issue is that we concat logins of selected options to a string
filterTextand check by!filterText.includes(login)if aloginis unselected, which is wrong, see below snippetApp/src/pages/NewChatPage.js
Lines 84 to 87 in 82669ae
What changes do you think we should make in order to solve the problem?
To fix this issue, we can save logins of selected options to an array
selectedLoginsand use method!_.contains(selectedLogins, login)to check if a login is unselected.To achieve it, we can change
App/src/pages/NewChatPage.js
Lines 84 to 87 in 82669ae
to
What alternative solutions did you explore? (Optional)
N/A
[-]Web - New group can't search an email if it's a substring of a selected email[/-][+][$1000] Web - New group can't search an email if it's a substring of a selected email[/+]melvin-bot commentedon Jul 25, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01911c9791a59f71c8
melvin-bot commentedon Jul 25, 2023
Current assignee @sophiepintoraetz is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jul 25, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)dukenv0307 commentedon Jul 25, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
New group can't search an email if it's a substring of a selected email.
What is the root cause of that problem?
Let's see the current logic on new chat page
App/src/pages/NewChatPage.js
Lines 84 to 88 in 82669ae
We are filtering selected options based on filterText, so in this case
abcde@gmail.com.include('bcde@gmail.com') will be true and bcde@gmail.com will not be displacedWhat changes do you think we should make in order to solve the problem?
when calling getNewChatOptions, we should pass selectedOptions params as 5th param. And then we don't need this logic to filter
App/src/pages/NewChatPage.js
Lines 84 to 88 in 82669ae
This also be the way we did in MoneyRequestParticipantsSplitSelector
Result
result.mov
What alternative solutions did you explore? (Optional)
FabianKoder commentedon Jul 25, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
New group can't search an email if it's a substring of a selected email.
What is the root cause of that problem?
When looking at the existing code:
App/src/pages/NewChatPage.js
Lines 84 to 87 in 82669ae
we can see the problem (
!filterText.includes(filteredUserToInvite.login)). This will match every possible combination.What changes do you think we should make in order to solve the problem?
Since
filteredUserToInviteas well asselectedOptionsboth have the uniqueloginproperty, it is possible to check if at least one element of the selectedOptions has a login identifier thats equal tofilteredUserToInvite.login. If that is not the case, we can show the filteredUserToInvite.What alternative solutions did you explore? (Optional)
N/A
28 remaining items
[-][$1000] Web - New group can't search an email if it's a substring of a selected email[/-][+][HOLD for payment 2023-08-16] [$1000] Web - New group can't search an email if it's a substring of a selected email[/+]melvin-bot commentedon Aug 9, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Aug 9, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.51-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-08-16. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon Aug 9, 2023
abdulrahuman5196 commentedon Aug 12, 2023
#7986 (comment)
No. Regression test won't be beneficial for this minor test case.
sophiepintoraetz commentedon Aug 16, 2023
Reconfirming that because there were no regressions and the PR review was held up on an Expensifier, and there were no major revisions suggested on the PR, I think this issue qualifies for an urgency bonus. This makes payments:
Payouts due:
Issue Reporter: $250 @eh2077/Eric Han
Contributor: $1500 @dukenv0307
Contributor+: $1500 @abdulrahuman5196 (via NewDot manual request)
Eligible for 50% #urgency bonus? Y
sophiepintoraetz commentedon Aug 16, 2023
Offer sent to bug reporter
eh2077 commentedon Aug 17, 2023
@sophiepintoraetz Accepted the offer thanks!
eh2077 commentedon Aug 22, 2023
Bump @sophiepintoraetz Can you kindly approve the payment for report bonus in Upwork? Thank you!
abdulrahuman5196 commentedon Aug 23, 2023
@sophiepintoraetz For me urgency bonus was not applied -

sophiepintoraetz commentedon Aug 24, 2023
@abdulrahuman5196 - apologies, I thought you were being paid via NewDot - you actually haven't been paid so let me do that now.
abdulrahuman5196 commentedon Aug 25, 2023
No worries. Thank you @sophiepintoraetz