Skip to content

[HOLD for payment 2024-04-25] [$500] Workspace - The user can skip validation of the first name field on the Personal info tab #38920

Closed

Description

@izarutskaya

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.4.56.0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4445017&group_by=cases:section_id&group_id=283225&group_order=asc
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal Team

Action Performed:

  1. Log in with a new expensifail account
  2. Create a workspace
  3. Navigate to Workspace settings - Bank account - Connect online with Plaid
  4. Choose Regions bank
  5. Continue until legal name is asked
  6. Leave the first name blank and input "Charleson" to the last name
  7. Tap on the "Next" button
  8. Tap on the "back" button
  9. Tap on the "Next" button
  10. Continue the flow until you get the "firstName is invalid or missing" error

Expected Result:

The field should be validated.

Actual Result:

The user can skip validation of the first name field on the Personal info tab. "Bank account can't be created, firstName is invalid or missing" error message appears later in the flow.

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

Bug6424896_1711259142194.XKMK1639.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c8adbf72aee79603
  • Upwork Job ID: 1774914745105002496
  • Last Price Increase: 2024-04-01
  • Automatic offers:
    • bernhardoj | Contributor | 0
Issue OwnerCurrent Issue Owner: @sobitneupane

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 25, 2024
  2. melvin-bot commented on Mar 25, 2024

    @melvin-bot

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

  3. izarutskaya commented on Mar 25, 2024

    @izarutskaya
    Author

    We think this issue might be related to the #collect project.

  4. bernhardoj commented on Mar 25, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The user can skip the legal name form after filling the last name, go back and reconfirm the routing number again.

    What is the root cause of that problem?

    We have getInitialSubstepForPersonalInfo to decide the sub-step index to show to the user.

    function getInitialSubstepForPersonalInfo(data: RequestorStepProps): number {
    if (data[personalInfoKeys.FIRST_NAME] === '' && data[personalInfoKeys.LAST_NAME] === '') {
    return 0;
    }
    if (data[personalInfoKeys.DOB] === '') {
    return 1;
    }

    If the first name and last name are empty, we will show the legal name form. However, if we fill in the last name, it will be saved to the draft and we check for both draft and server value

    const values = useMemo(() => getSubstepValues(PERSONAL_INFO_STEP_KEYS, reimbursementAccountDraft, reimbursementAccount), [reimbursementAccount, reimbursementAccountDraft]);

    and the condition will fail because it needs both fields to be empty.

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

    Show the legal name form if one of the first or last names is empty.

    if (data[personalInfoKeys.FIRST_NAME] === '' || data[personalInfoKeys.LAST_NAME] === '') {
        return 0;
    }
    

    What alternative solutions did you explore? (Optional)

    Don't check for the draft data.

    const values = useMemo(() => getSubstepValues(PERSONAL_INFO_STEP_KEYS, reimbursementAccountDraft, reimbursementAccount), [reimbursementAccount, reimbursementAccountDraft]);

    const values = useMemo(() => getSubstepValues(PERSONAL_INFO_STEP_KEYS, null, reimbursementAccount), [reimbursementAccount, reimbursementAccountDraft]);
    

    OR

    Always starts from 0 (the legal name form).

    const {componentToRender: SubStep, isEditing, screenIndex, nextScreen, prevScreen, moveTo, goToTheLastStep} = useSubStep({bodyContent, startFrom, onFinished: submit});

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 1, 2024
  6. melvin-bot commented on Apr 1, 2024

    @melvin-bot
  7. changed the title [-]Workspace - The user can skip validation of the first name field on the Personal info tab[/-] [+][$500] Workspace - The user can skip validation of the first name field on the Personal info tab[/+] on Apr 1, 2024
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 1, 2024
  9. melvin-bot commented on Apr 1, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

  10. johncschuster commented on Apr 1, 2024

    @johncschuster
    Contributor

    I'm not sure how this fits into any of our existing initiatives, but this feels like either an oversight or a regression if the user can skip ahead of entering their first name in the form.

  11. 27 remaining items

  12. johncschuster commented on Apr 26, 2024

    @johncschuster
    Contributor

    @sobitneupane, can you complete the BZ Checklist above? Thank you!

  13. melvin-bot commented on Apr 30, 2024

    @melvin-bot

    @johncschuster, @sobitneupane, @grgia, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  14. johncschuster commented on Apr 30, 2024

    @johncschuster
    Contributor

    Waiting on the BZ Checklist to be completed 👍

  15. melvin-bot commented on May 2, 2024

    @melvin-bot

    @johncschuster, @sobitneupane, @grgia, @bernhardoj Eep! 4 days overdue now. Issues have feelings too...

  16. sobitneupane commented on May 7, 2024

    @sobitneupane
    Contributor

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

    #31121

    • [@sobitneupane] 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:

    #31121 (comment)

    • [@sobitneupane] 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:
    • [@sobitneupane] Determine if we should create a regression test for this bug.

    Yes.

    • [@sobitneupane] 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.

    #38920 (comment)

  17. sobitneupane commented on May 7, 2024

    @sobitneupane
    Contributor

    Regression Test Proposal

    1. Open Settings > Workspaces > Select any workspace > Bank account
    2. Connect manually
    3. Complete the routing and bank account number step
    4. Fill the last name but leave first name empty
    5. Go back
    6. Go next again and confirm the routing and bank account number again
    7. Verify you are navigated to the first and last name step
  18. sobitneupane commented on May 8, 2024

    @sobitneupane
    Contributor

    Requested payment in newDot.
    #38920 (comment)

  19. JmillsExpensify commented on May 12, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @sobitneupane

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions