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 2024-02-07] [$125] Teachers Unite - The character input is limited #35144

Closed
6 tasks done
kavimuru opened this issue Jan 25, 2024 · 19 comments
Closed
6 tasks done
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Jan 25, 2024

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 #34502
Version Number: 1.4.31.1
Reproducible in staging?: y
Reproducible in production?: y
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. Log in as a new expensifail user
  2. Tap on FAB - Save the world - I am a teacher
  3. Type in "Ádám" in the name field

Expected Result:

I should be able to input characters that the profile display name accepts.

Actual Result:

The character input is limited, it only accepts Latin characters. I can input the same text as my profile display name without problems.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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

Add any screenshot/video evidence

Bug6354472_1706178292386.OCXB4780.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0149b1c044231d033c
  • Upwork Job ID: 1750500293635174400
  • Last Price Increase: 2024-01-25
  • Automatic offers:
    • ishpaul777 | Reviewer | 28122476
    • paultsimura | Contributor | 28122477
@kavimuru kavimuru added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 25, 2024
@melvin-bot melvin-bot bot changed the title Teachers Unite - The character input is limited [$500] Teachers Unite - The character input is limited Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0149b1c044231d033c

Copy link

melvin-bot bot commented Jan 25, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

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

@paultsimura
Copy link
Contributor

Proposal

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

Teacher's name doesn't allow accented chard.

What is the root cause of that problem?

We use the isValidLegalName validation that doesn't allow accented symbols:

if (!ValidationUtils.isValidLegalName(values.firstName)) {
ErrorUtils.addErrorMessage(errors, 'firstName', 'privatePersonalDetails.error.hasInvalidCharacter');
} else if (!values.firstName) {
ErrorUtils.addErrorMessage(errors, 'firstName', 'bankAccount.error.firstName');
}
if (!ValidationUtils.isValidLegalName(values.lastName)) {
ErrorUtils.addErrorMessage(errors, 'lastName', 'privatePersonalDetails.error.hasInvalidCharacter');
} else if (!values.lastName) {
ErrorUtils.addErrorMessage(errors, 'lastName', 'bankAccount.error.lastName');
}

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

We should use either isValidDisplayName, or build a new validation to check only for:

CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS.test(name)

What alternative solutions did you explore? (Optional)

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Jan 25, 2024

Proposal

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

Teachers Unite - The character input is limited
Doesn't allow accented characters.

What is the root cause of that problem?

For validation we are using

if (!ValidationUtils.isValidLegalName(values.firstName)) {
ErrorUtils.addErrorMessage(errors, 'firstName', 'privatePersonalDetails.error.hasInvalidCharacter');
} else if (!values.firstName) {

That checks for latin characters

function isValidLegalName(name: string): boolean {
const hasAccentedChars = Boolean(name.match(CONST.REGEX.ACCENT_LATIN_CHARS));
return CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS.test(name) && !hasAccentedChars;
}

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

If we don't want this validation, we can create a new same method and remove ACCENT_LATIN_CHARS regex test.
This will ensure that we don't cause regressions elsewhere.

What alternative solutions did you explore? (Optional)

@youssef-lr youssef-lr changed the title [$500] Teachers Unite - The character input is limited [$125] Teachers Unite - The character input is limited Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

Upwork job price has been updated to $125

@youssef-lr
Copy link
Contributor

Adjusting price as it's low priority.

@ghost
Copy link

ghost commented Jan 25, 2024

I am interested

@ishpaul777
Copy link
Contributor

ishpaul777 commented Jan 25, 2024

Thanks for proposals @paultsimura @BhuvaneshPatil ,

we can move forward with @paultsimura as this straightforward fix and they proposed it first #35144 (comment), to allow accented latin chars in 'I know a teacher" Form , either reusing isValidDisplayName/isValidPersonName or making a new utility, i'll let the assigned engineer make the choice on the expected behaviour.

1️⃣ use the same validation as Profile Display Name page, which is isValidDisplayName, OP suggests this as expected behavior
2️⃣ build a new validation function to allow accented latin characters also, suggested by @paultsimura first
3️⃣ use existing isValidPersonName function, which disallows all special characters, not proposed by anyone but a possible option

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jan 25, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Jan 25, 2024

📣 @paultsimura 🎉 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 Jan 26, 2024
@paultsimura
Copy link
Contributor

Thanks. The PR is ready for review: #35229

I've added a grammatical correction to the copies in this PR. Requested confirmation in Slack.

@greg-schroeder
Copy link
Contributor

Merged, awaiting deploy to staging -> prod

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Jan 31, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Jan 31, 2024
@melvin-bot melvin-bot bot changed the title [$125] Teachers Unite - The character input is limited [HOLD for payment 2024-02-07] [$125] Teachers Unite - The character input is limited Jan 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

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

Copy link

melvin-bot bot commented Jan 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-5 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 2024-02-07. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 31, 2024

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:

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

@ishpaul777
Copy link
Contributor

The earlier validation was introduced in #26412 quite intentionlly not by mistake so i dont we need point this on the PR.

Also this was not impactful issue so the Regression test is not required.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 6, 2024
@greg-schroeder
Copy link
Contributor

All right, looks like we're ready to go for payment tomorrow, 2/7. Offers are accepted.

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants