Skip to content
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

Invite member - Search is unable to validate when more than one email used belong to member #29494

Closed
6 tasks done
lanitochka17 opened this issue Oct 12, 2023 · 10 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Monthly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 12, 2023

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.3.83-5

Reproducible in staging?: Yes

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

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Settings > Workspaces > any workspace > Member > Invite
  3. Invite two members (A and B)
  4. Return to Invite page
  5. Enter the email of User A
  6. Enter the email of User A and B

Expected Result:

The search field should be able to validate when both the emails used belong to the workspace member, as it does when one member email is searched

Actual Result:

The search result shows invalid email rather than saying User A and B are member of the workspace

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Bug6234899_1697139301857.20231013_030358.mp4
MacOS: Desktop

View all open jobs on GitHub

@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

Triggered auto assignment to @conorpendergrast (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

Triggered auto assignment to @cead22 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Oct 13, 2023

Don't think we need to block deploy on this tough, the expected behavior isn't broken, we're just not displaying the correct error message

@jasperhuangg jasperhuangg self-assigned this Oct 13, 2023
@jasperhuangg jasperhuangg added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Oct 13, 2023
@jasperhuangg
Copy link
Contributor

jasperhuangg commented Oct 13, 2023

This seems to be a regression from #29044. @Samueljh1 Please raise a followup PR to fix this. The validation should be flexible in handling whether invalid/excluded emails are entered in the search input here

For instance, if you enter an invalid email and a valid email:
invalid@email.com, valid@email.com

valid@email.com should still appear as an option to invite, but we should show an error message saying invalid@email.com isn't valid.

@jasperhuangg jasperhuangg removed their assignment Oct 13, 2023
@Samueljh1
Copy link
Contributor

Samueljh1 commented Oct 13, 2023

This seems to be a regression from #29044. @Samueljh1 Please raise a followup PR to fix this. The validation should be flexible in handling whether invalid/excluded emails are entered in the search input here

For instance, if you enter an invalid email and a valid email: invalid@email.com, valid@email.com

valid@email.com should still appear as an option to invite, but we should show an error message saying invalid@email.com isn't valid.

I considered doing this while I submitted the PR, but I decided not to, to avoid overcomplicating things. This feature was requested so that emails could be added in bulk. In the case of invalid/already invited emails, the code simply ignores them and only displays valid ones in the search result. This issue is the result of an edge case where everyone in the search term is a member already (or has an invalid email).

  • Suppose we have the search term: ‘admin@expensify.com, alreadyinvited@gmail.com’. Which error message do we display? One is an invalid (blacklisted) email, and the other is an email already invited. We would probably have to create a new message along the lines of ‘None of the emails specified can be invited’
  • Following from this, in the context of a corporate situation, possibly hundreds of emails could be pasted in at once. Do we want to clog up the window with a huge error message listing all the problematic emails instead of simply ignoring them from the search results?

These were the reasons I left the error messaging handling to the way they are now. I think the most suitable approach should be discussed before merging the PR, but I suggest the following:

  • When no emails specified can be invited: Send a new error message (e.g., ‘All of the emails specified are invalid or have been invited already’
  • Continue to ignore any invalid emails when there is at least one valid email

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 13, 2023
@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

This issue has not been updated in over 15 days. @cead22, @conorpendergrast eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@cead22 cead22 removed the Reviewing Has a PR in review label Dec 15, 2023
@melvin-bot melvin-bot bot added the Overdue label Dec 15, 2023
@cead22
Copy link
Contributor

cead22 commented Dec 15, 2023

I missed this cause it was labeled "Reviewing", @jasperhuangg @Samueljh1 what's the latest on this, do we still need to fix something?

@melvin-bot melvin-bot bot removed the Overdue label Dec 15, 2023
@Samueljh1
Copy link
Contributor

I missed this cause it was labeled "Reviewing", @jasperhuangg @Samueljh1 what's the latest on this, do we still need to fix something?

The original PR ended up being reverted, so this issue no longer applies. You can close the issue.

@cead22 cead22 closed this as completed Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Monthly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants