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

[HOLD for payment 2023-09-12] [$500] FAB - Symbols are allowed in legal name #26275

Closed
1 of 6 tasks
izarutskaya opened this issue Aug 30, 2023 · 33 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 30, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Click on FAB
  2. Click Save the World > I Know a teacher
  3. Enter any symbol in the First and Last name field

Expected Result:

'Name can only include letters' Error is thrown

Actual Result:

No error is thrown. and allows to save

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: v1.3.59-0

Reproducible in staging?: Y

Reproducible in production?: New feature

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

image (21)

image

Expensify/Expensify Issue URL:

Issue reported by: @daveSeife

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693365548751779

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01572957e06c2a6850
  • Upwork Job ID: 1697237710114856960
  • Last Price Increase: 2023-08-31
  • Automatic offers:
    • daveSeife | Reporter | 26432445
    • dukenv0307 | Contributor | 26432463
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 30, 2023
@dukenv0307
Copy link
Contributor

Proposal

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

Symbols are allowed in legal name

What is the root cause of that problem?

We only show the error if the name is empty

if (_.isEmpty(values.firstName)) {
ErrorUtils.addErrorMessage(errors, 'firstName', translate('bankAccount.error.firstName'));
}
if (_.isEmpty(values.lastName)) {
ErrorUtils.addErrorMessage(errors, 'lastName', translate('bankAccount.error.lastName'));
}

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

We can re-use ValidationUtils.isValidLegalName to validate symbol characters and then set the error as Name can only include letters

if (!ValidationUtils.isValidLegalName(values.firstName)) {
    errors.legalFirstName = 'new translation'; // Invalid characters error
} else if (_.isEmpty(values.firstName)) {
    errors.legalFirstName = 'common.error.fieldRequired';
}

if (!ValidationUtils.isValidLegalName(values.lastName)) {
    errors.legalLastName = 'new translation'; // Invalid characters error
} else if (_.isEmpty(values.lastName)) {
    errors.legalLastName = 'common.error.fieldRequired';
}

if (_.isEmpty(values.firstName)) {
ErrorUtils.addErrorMessage(errors, 'firstName', translate('bankAccount.error.firstName'));
}
if (_.isEmpty(values.lastName)) {
ErrorUtils.addErrorMessage(errors, 'lastName', translate('bankAccount.error.lastName'));
}

What alternative solutions did you explore? (Optional)

@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 30, 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 Aug 30, 2023

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

@madmax330
Copy link
Contributor

@marcochavezf assigning you since you see to be handling the teacher's thing.

@madmax330 madmax330 assigned marcochavezf and unassigned madmax330 Aug 30, 2023
@madmax330
Copy link
Contributor

This was added here: #23063
I'm not sure it's a blocker.

@studentofcoding
Copy link
Contributor

Proposal

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

Symbols are allowed in legal name

What is the root cause of that problem?

We're only checking if the Legal Names (firstName & lastName) are Empty or not, & not checking the validity of the Legal Name to have only the Alphabet, thus No error appears when using the symbol

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

We should use isValidLegalName function from ValidationUtils to check if the Legal Name contains any non-valid character

Where we need to change the code here

if (_.isEmpty(values.firstName)) {
ErrorUtils.addErrorMessage(errors, 'firstName', translate('bankAccount.error.firstName'));
}
if (_.isEmpty(values.lastName)) {
ErrorUtils.addErrorMessage(errors, 'lastName', translate('bankAccount.error.lastName'));
}

To contain isValidLegalName condition

            if (_.isEmpty(values.firstName) || !ValidationUtils.isValidLegalName(values.firstName)) {
                ErrorUtils.addErrorMessage(errors, 'firstName', translate('bankAccount.error.firstName'));
            }
            if (_.isEmpty(values.lastName) || !ValidationUtils.isValidLegalName(values.lastName)) {
                ErrorUtils.addErrorMessage(errors, 'lastName', translate('bankAccount.error.lastName'));
            }

Result

check.if.Legal.Name.is.Valid.mov

cc: @marcochavezf @sakluger

@parasharrajat
Copy link
Member

I didn't know if there was such a requirement. But if yes we should. BTW, it is not a deployblocker.

@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Aug 30, 2023
@mountiny
Copy link
Contributor

demoting I agree this is not a deploy blocker, its a new feature and polish

@JmillsExpensify
Copy link

Also agree this isn't a deploy blocker.

@parasharrajat
Copy link
Member

parasharrajat commented Aug 31, 2023

Should we handle this with the original issue or a new one? Based on that, the correct author will be assigned.

@JmillsExpensify Please assign me as C+ if needed.

@parasharrajat
Copy link
Member

parasharrajat commented Aug 31, 2023

In any case, proposal from @dukenv0307 looks promising. We can use the existing translations privatePersonalDetails.error.hasInvalidCharacter for this case as well.

Let's do the same for https://github.com/Expensify/App/blob/main/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

Triggered auto assignment to @marcaaron, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

📣 @parasharrajat Please request via NewDot manual requests for the Reviewer role ($500)

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 31, 2023
@dukenv0307
Copy link
Contributor

@parasharrajat The PR is ready to review.

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

🎯 ⚡️ Woah @parasharrajat / @dukenv0307, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @dukenv0307 got assigned: 2023-08-31 13:21:29 Z
  • when the PR got merged: 2023-09-04 00:36:20 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 5, 2023
@melvin-bot melvin-bot bot changed the title [$500] FAB - Symbols are allowed in legal name [HOLD for payment 2023-09-12] [$500] FAB - Symbols are allowed in legal name Sep 5, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.63-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-09-12. 🎊

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:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
  • [@parasharrajat] 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:
  • [@parasharrajat] 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:
  • [@parasharrajat] Determine if we should create a regression test for this bug.
  • [@parasharrajat] 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.
  • [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Sep 12, 2023
@sakluger
Copy link
Contributor

Summarizing payouts for this issue:

Reporter: @daveSeife $50 (hired and paid via Upwork)
Contributor: @dukenv0307 $750 (hired and paid via Upwork)
Contributor+: @parasharrajat $750 (payable via Manual Request after BZ checklist is completed)

Above payments include efficiency bonus 🎉

@parasharrajat can you please finish the BZ checklist? Thanks!

@parasharrajat
Copy link
Member

parasharrajat commented Sep 15, 2023

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:

Regression Test Steps

  1. Login with any account
  2. Go to FAB > Save the world
  3. Click on I Know a teacher
  4. Enter the firstName input with a symbol character i.e. + and blur the input
  5. Do the same with lastName input
  6. Verify that the error Name can only include letters appears.

Do you agree 👍 or 👎 ?

@sakluger
Copy link
Contributor

Looks good, thanks!

@parasharrajat
Copy link
Member

Payment requested as per #26275 (comment)

@JmillsExpensify
Copy link

$750 payment approved for @parasharrajat based on summary above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests