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-08-26][$250] Settings - Legal first and last name fields aren't accepting umlaut characters #46345

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 27, 2024 · 30 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 27, 2024

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


Version Number: 9.0.13-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Log in with any annyount
  3. Navigate to Account settings - Legal name
  4. Input "Ádám" as first name
  5. Input "Horváth" as last name
  6. Click on the "Save" button

Expected Result:

I should be able to save a legal name with umlauts

Actual Result:

Legal first and last name fields aren't accepting umlaut characters

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

Add any screenshot/video evidence

Bug6554003_1722020390811.bandicam_2024-07-26_20-31-57-432.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015c756a4a661d9b30
  • Upwork Job ID: 1818046683226587925
  • Last Price Increase: 2024-08-05
  • Automatic offers:
    • situchan | Reviewer | 103451568
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 27, 2024
Copy link

melvin-bot bot commented Jul 27, 2024

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@daledah
Copy link
Contributor

daledah commented Jul 27, 2024

Proposal

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

Legal first and last name fields aren't accepting umlaut characters

What is the root cause of that problem?

In here We are considering a valid legal name that has no accented chars.

const hasAccentedChars = !!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?

we should update regex ACCENT_LATIN_CHARS in here to exclude umlaut characters like Ádám Horváth

App/src/CONST.ts

Line 2292 in 5e65276

ACCENT_LATIN_CHARS: /[\u00C0-\u017F]/g,

What alternative solutions did you explore? (Optional)

We can consider removing the hasAccentedChars check condition because as far as I know there are many valid legal names that have accented chars

@melvin-bot melvin-bot bot added the Overdue label Jul 29, 2024
@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label Jul 29, 2024
@melvin-bot melvin-bot bot changed the title Settings - Legal first and last name fields aren't accepting umlaut characters [$250] Settings - Legal first and last name fields aren't accepting umlaut characters Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

Job added to Upwork: https://www.upwork.com/jobs/~015c756a4a661d9b30

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

melvin-bot bot commented Jul 29, 2024

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

@situchan
Copy link
Contributor

Looks like bank account personal name rejected accent chars in #37052 and then reverted in #44689 to accept back.
Similarly, should we now support accent chars in legal name?
cc: @johncschuster

@isogit123
Copy link
Contributor

Proposal

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

Legal first and last name fields aren't accepting umlaut characters

What is the root cause of that problem?

In the code below, the validation of the legal name requires that it has no accented characters.

const hasAccentedChars = !!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?

To accept accented characters, remove the hasAccentedChars check from the code below so we take all Latin characters.

const hasAccentedChars = !!name.match(CONST.REGEX.ACCENT_LATIN_CHARS);
return CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS.test(name) && !hasAccentedChars;

After that, remove the ACCENT_LATIN_CHARS regex from the code below as it is no longer required.

App/src/CONST.ts

Line 2292 in 5e65276

ACCENT_LATIN_CHARS: /[\u00C0-\u017F]/g,

Below is a POC after applying the change:

acc.mp4

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Aug 3, 2024
Copy link

melvin-bot bot commented Aug 5, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Aug 5, 2024

@johncschuster, @situchan Huh... This is 4 days overdue. Who can take care of this?

@johncschuster
Copy link
Contributor

Thanks for raising your question above, @situchan!

I'm not 100% sure if we've elected to accept special characters in the legal first and last name sections of the product. I've raised a discussion in #product to figure that out.

@johncschuster
Copy link
Contributor

Similarly, should we now support accent chars in legal name?

Yes, I think so. If we're going to accept accent characters in the personal name fields, we should accept them in all fields in which a user can enter their legal name.

@melvin-bot melvin-bot bot removed the Overdue label Aug 5, 2024
@situchan
Copy link
Contributor

situchan commented Aug 6, 2024

We can go with @daledah's alternative solution as we now accept accent characters in legal name.

@daledah please make sure to add / update unit tests accordingly

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 6, 2024

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

@robertjchen
Copy link
Contributor

Let's roll with @daledah's approach 👍

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

melvin-bot bot commented Aug 8, 2024

📣 @situchan 🎉 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 Aug 8, 2024

📣 @daledah You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
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 9, 2024
@daledah
Copy link
Contributor

daledah commented Aug 9, 2024

@situchan This PR is ready for review.

@robertjchen robertjchen removed the Reviewing Has a PR in review label Aug 22, 2024
@melvin-bot melvin-bot bot added the Overdue label Aug 22, 2024
@robertjchen
Copy link
Contributor

Looks like the changes are out- @johncschuster would you be able to handle the next steps here? 🙏

@melvin-bot melvin-bot bot removed the Overdue label Aug 22, 2024
Copy link

melvin-bot bot commented Aug 24, 2024

@robertjchen @johncschuster @situchan @daledah this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@robertjchen
Copy link
Contributor

bump @johncschuster on next steps 🙏

@johncschuster
Copy link
Contributor

Sorry for missing your ping, @robertjchen! Yep! I'll take care of next steps (let me catch up on those now)

@johncschuster
Copy link
Contributor

@daledah, can you please apply to the Upwork Job?

@situchan, do we need a set of regression test steps?

@johncschuster johncschuster changed the title [$250] Settings - Legal first and last name fields aren't accepting umlaut characters [HOLD for payment 2024-08-26][$250] Settings - Legal first and last name fields aren't accepting umlaut characters Sep 3, 2024
@johncschuster
Copy link
Contributor

I've adjusted the title of the issue to reflect the date this should have been paid out. This will also help me come back to this since I action all of my "Hold for payment" issues first thing in the morning and won't miss it.

@situchan
Copy link
Contributor

situchan commented Sep 3, 2024

The automated tests already cover regression test so I think we're all good.

@johncschuster
Copy link
Contributor

Sweet. Thanks!

@johncschuster
Copy link
Contributor

I've issued payment to @situchan. All that's left is to issue payment to @daledah 👍

@daledah
Copy link
Contributor

daledah commented Sep 4, 2024

@daledah, can you please apply to the Upwork Job?

@johncschuster I have 0 Upwork Connect point so cannot, would you mind sending the offer to my profile here? https://www.upwork.com/freelancers/~0138d999529f34d33f

Thx

@johncschuster
Copy link
Contributor

Sure thing, @daledah! I've just sent you an offer. Can you accept that?

@daledah
Copy link
Contributor

daledah commented Sep 4, 2024

@johncschuster Great, done 🙏

@robertjchen
Copy link
Contributor

thanks, all!

@daledah
Copy link
Contributor

daledah commented Sep 30, 2024

@johncschuster @robertjchen The Upwork job for me remains unpaid, could you kindly reopen the issue and take a look at that? Thx

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
No open projects
Status: No status
Development

No branches or pull requests

6 participants