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-09-20] [$1000] Workspace - Incorrect Behavior When Inviting Existing User with Capitalized Email #25636
Attempt to invite the same user again, but this time, capitalize the first letter of the user's email address or write the email address entirely in capital letters
Observe the description that is displayed
Expected Result:
The description should clearly state that the user is already a member of the workspace
Actual Result:
Instead of the expected message, it displays "No results found" when inviting the same user with capitalized email letters
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
Windows / Chrome
MacOS / Desktop
Version Number: 1.3.56-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Please re-state the problem that we are trying to solve in this issue.
Emails of workspace members when typed in capital letters in the Invite search input shows 'No results found' instead of showing "user already a member of the workspace"
What is the root cause of that problem?
We are directly matching the trimmed searchTerm without converting it to lower case.
Slight difference with this is the header message is shown in the same case as the search value with this solution whereas with the first solution the header message shows the lower case email.
changed the title [-]Workspace - Incorrect Behavior When Inviting Existing User with Capitalized Email[/-][+][$1000] Workspace - Incorrect Behavior When Inviting Existing User with Capitalized Email[/+]on Aug 29, 2023
Activity
DylanDylann commentedon Aug 22, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Incorrect Behavior When Inviting Existing User with Capitalized Email
What is the root cause of that problem?
App/src/pages/workspace/WorkspaceInvitePage.js
Lines 187 to 196 in c435734
We don't lowercase the search value before validating it
What changes do you think we should make in order to solve the problem?
we should lowercase searchvalue before validating like this
Result
esh-g commentedon Aug 22, 2023
Proposal
Please re-state the problem
There is a difference of error messages between uppercase and lowercase emails.
What is the root cause of this problem?
We are not converting the
searchTermto lowercase while comparing it to the excluded participants.App/src/pages/workspace/WorkspaceInvitePage.js
Line 188 in ed2c287
What changes should be made in order to solve this problem?
We should convert the
searchTermto lowercase before comparing which can be done like this:This is approach is being used in other places as well, so I think we will be consistent in that approach.
App/src/libs/OptionsListUtils.js
Line 638 in ed2c287
App/src/components/EmojiPicker/EmojiPickerMenu/index.js
Line 420 in ed2c287
What other alternative approach did you explore? (Optional)
None
c3024 commentedon Aug 22, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Emails of workspace members when typed in capital letters in the Invite search input shows 'No results found' instead of showing "user already a member of the workspace"
What is the root cause of that problem?
We are directly matching the trimmed
searchTermwithout converting it to lower case.App/src/pages/workspace/WorkspaceInvitePage.js
Lines 187 to 193 in 63d87ba
So already existing emails do not get matched because they are in lower case and the search string includes capital letters.
What changes do you think we should make in order to solve the problem?
We should change this mentioned above
App/src/pages/workspace/WorkspaceInvitePage.js
Line 188 in 63d87ba
to
Now even Expensify emails are matched case-insensitively.
What alternative solutions did you explore? (Optional)
We can instead not convert directly the
searchValueto lower case and change it to lower case in the conditionals like thisSlight difference with this is the header message is shown in the same case as the search value with this solution whereas with the first solution the header message shows the lower case email.
Result
capitalLetterEmailSearchInWorkspaceInvitePage.mov
capitalLetterEmailSearchInWorkspaceInvitePage2.mov
melvin-bot commentedon Aug 22, 2023
Triggered auto assignment to @muttmuure (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Aug 22, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Aug 25, 2023
@muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Aug 29, 2023
@muttmuure Still overdue 6 days?! Let's take care of this!
[-]Workspace - Incorrect Behavior When Inviting Existing User with Capitalized Email[/-][+][$1000] Workspace - Incorrect Behavior When Inviting Existing User with Capitalized Email[/+]melvin-bot commentedon Aug 29, 2023
Job added to Upwork: https://www.upwork.com/jobs/~010c78f3bb410f312f
43 remaining items
muttmuure commentedon Oct 4, 2023
Offers sent, including urgency bonus
jjcoffee commentedon Oct 4, 2023
@muttmuure Thanks, offer accepted!
Habben101 commentedon Oct 4, 2023
@muttmuure Thanks, I've accepted the offer.
techievivek commentedon Oct 9, 2023
@muttmuure are we done with the payment here? Can we close the issue now?
techievivek commentedon Oct 11, 2023
DMed Matt to look into it.
muttmuure commentedon Oct 11, 2023
Handling
muttmuure commentedon Oct 11, 2023
Just waiting on @DylanDylann to accept, then we can close out
DylanDylann commentedon Oct 11, 2023
@muttmuure I've accepted, thank you!
muttmuure commentedon Oct 11, 2023
Paid!