Skip to content

[HOLD for payment 2023-10-27] [$500] IOU Category - Search message shows 'Invalid email' when typing email address in search field #28078

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue found when executing PR #27459

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to any workspace chat
  3. Go to + > Request money > Manual
  4. Enter an amount
  5. Click Show more > Category.
  6. Enter a few letters, followed by @

Expected Result:

The message below the search field will display 'No results found'..

Actual Result:

The message below the search field displays 'invalid email' when Category search does not involve email

Workaround:

Unknown

Platforms:

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.73-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:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug6211688_20230923_190412.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0131655c00ab293751
  • Upwork Job ID: 1710313308418142208
  • Last Price Increase: 2023-10-13
  • Automatic offers:
    • DylanDylann | Contributor | 27217343

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 23, 2023
  2. melvin-bot commented on Sep 23, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 23, 2023

    @melvin-bot

    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
  4. DylanDylann commented on Sep 23, 2023

    @DylanDylann
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    IOU Category - Search message shows 'Invalid email' when typing email address in search field

    What is the root cause of that problem?

    if (searchValue && !hasSelectableOptions && !hasUserToInvite) {
    if (/^\d+$/.test(searchValue) && !isValidPhone) {
    return Localize.translate(preferredLocale, 'messages.errorMessageInvalidPhone');
    }
    if (/@/.test(searchValue) && !isValidEmail) {
    return Localize.translate(preferredLocale, 'messages.errorMessageInvalidEmail');
    }
    if (hasMatchedParticipant && (isValidEmail || isValidPhone)) {
    return '';
    }

    Let's see the logic to get header message, we are checking if the search value includes "@" we will display errorMessageInvalidEmail instead of noResultsFound

    What changes do you think we should make in order to solve the problem?

    In this case, we don't search email and phone number

    if (/^\d+$/.test(searchValue) && !isValidPhone) {
    return Localize.translate(preferredLocale, 'messages.errorMessageInvalidPhone');
    }
    if (/@/.test(searchValue) && !isValidEmail) {
    return Localize.translate(preferredLocale, 'messages.errorMessageInvalidEmail');
    }
    if (hasMatchedParticipant && (isValidEmail || isValidPhone)) {
    return '';
    }

    So this logic to redandunt. We need to pass one more params called includeEmailAndPhoneNumber to getHeaderMessage function

    and only apply logic to check email and phone if this param is true

    What alternative solutions did you explore? (Optional)

  5. Christinadobrzyn commented on Sep 25, 2023

    @Christinadobrzyn
    Contributor

    Not sure how to make a Category, asking QA - https://expensify.slack.com/archives/C9YU7BX5M/p1695681312874909

  6. Christinadobrzyn commented on Sep 27, 2023

    @Christinadobrzyn
    Contributor

    still trying to get Categories to work on my c.dobrzyn+45@expensifail.com account.

    Asking if anyone else has this issue? https://expensify.slack.com/archives/C01SKUP7QR0/p1695845916425979

  7. Christinadobrzyn commented on Sep 28, 2023

    @Christinadobrzyn
  8. DylanDylann commented on Sep 29, 2023

    @DylanDylann
    Contributor

    @Christinadobrzyn I still can reproduce this bug on the latest main by enabling permission in the codebase. You can ping C+ team or internal engineer to help verify the bug

  9. DylanDylann commented on Oct 2, 2023

    @DylanDylann
    Contributor

    @Christinadobrzyn This is an example of category issue: #28079

  10. DylanDylann commented on Oct 4, 2023

    @DylanDylann
    Contributor

    @s77rt It seems @Christinadobrzyn can't access the category feature. Because you are C+ Contributor of another issue that relates to category #28517. Could you help to verify this is a bug?
    Sorry, If I bothers you

  11. s77rt commented on Oct 4, 2023

    @s77rt
    Member

    I can reproduce the bug

    Screenshot 2023-10-04 at 4 29 35 PM
  12. 56 remaining items

  13. MariaHCD commented on Oct 30, 2023

    @MariaHCD
    Contributor

    I believe we just need the BZ checklist here so we can proceed with the payments

  14. Christinadobrzyn commented on Oct 30, 2023

    @Christinadobrzyn
    Contributor

    Payouts due:

    Issue Reporter: NA - reporter is Applause
    Contributor: $500 + $250 speed bonus @DylanDylann (Paid through Upwork)
    Contributor+: $500 + $250 speed bonus @rushatgabhane (paid manually in NewExpensify)

    Eligible for 50% #urgency bonus? Y - #28078 (comment)

    Upwork job is here.

    @rushatgabhane could you let us know about a regression test?

  15. Christinadobrzyn commented on Oct 31, 2023

    @Christinadobrzyn
    Contributor

    nudge @rushatgabhane about a regression test, thanks!

  16. melvin-bot commented on Nov 6, 2023

    @melvin-bot

    @MariaHCD, @rushatgabhane, @Christinadobrzyn, @DylanDylann Eep! 4 days overdue now. Issues have feelings too...

  17. Christinadobrzyn commented on Nov 6, 2023

    @Christinadobrzyn
    Contributor

    Dming @rushatgabhane to see if we need a regression test

  18. rushatgabhane commented on Nov 7, 2023

    @rushatgabhane
    Member
    1. The PR that introduced the bug has been identified. Link to the PR: Categories UI/UX #26501

    2. 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: https://github.com/Expensify/App/pull/26501/files#r1384335093

    3. 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: N.A.

    4. Determine if we should create a regression test for this bug. No

    5. 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 N.A.

  19. rushatgabhane commented on Nov 7, 2023

    @rushatgabhane
    Member
  20. Christinadobrzyn commented on Nov 7, 2023

    @Christinadobrzyn
    Contributor

    awesome! I think this can be closed.

  21. JmillsExpensify commented on Nov 13, 2023

    @JmillsExpensify
    Contributor

    $750 payment approved for @rushatgabhane based on this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions