-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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-04-17] [$1000] Profile - Personal Details- Able to save Fist and Last name fields with One space #16611
Comments
Triggered auto assignment to @NicMendonca ( |
Bug0 Triage Checklist (Main S/O)
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Ah, I just noticed that we do throw an error that its mandatory, so I agree you shouldn't be able to save it without text. |
Job added to Upwork: https://www.upwork.com/jobs/~01c107dbee7d205160 |
Current assignee @NicMendonca is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - Personal Details- Able to save Fist and Last name fields with One space. What is the root cause of that problem?Within
For strings and array-like objects What changes do you think we should make in order to solve the problem?Within // _.isEmpty(values.legalFirstName) // *** OLD ***
_.isEmpty(values.legalFirstName.trim()) // *** UPDATED ***
// _.isEmpty(values.legalLastName) // *** OLD ****
_.isEmpty(values.legalLastName.trim()) // *** UPDATED *** What alternative solutions did you explore? (Optional)None ResultsOneSpace.mov |
Triggered auto assignment to @jasperhuangg ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Legal names allow spaces in the field What is the root cause of that problem?We are allowing space as per the regex for legal names here Line 863 in 8ac3824
What changes do you think we should make in order to solve the problem?Remove space from regex which won't allow space in the first and last legal name and shows the error which prevents the form from saving. |
@Pujan92 that We added it as a solution of this issue #15741 As we do not allow any special chars and we have to allow space because some people has space in First name or Middle name etc. So that regular expression is ok for solving that problem and we can not remove space from that. Here actual problem is, when input has only space (without any chars) at that time it will go to
|
Should we make the change in Form.js instead? And do it for all inputs |
@rushatgabhane Note sure to add within Form.js is a good idea or not. I am sceptical that it should create issue for others places as Form.js is used many places. So I do not prefer this. |
@PrashantMangukiya as the error message says |
@PrashantMangukiya |
📣 @Riddhi2291! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Format:
|
@Pujan92 Thank you. During pr review we decided to allow space #15989 (comment) and set such message, so it match with server side api that accepts numbers like "Paulo 1st" or "John the 2nd" etc. Thank you. |
ProposalPlease re-state the problem that we are trying to solve in this issue.We can use space as legal name What is the root cause of that problem?The regex expression to test the name contains space What changes do you think we should make in order to solve the problem?We can add a new regex in CONST.js to test Legal Name and update test expression here: App/src/libs/ValidationUtils.js Lines 367 to 369 in 3fdae58
Also I think we need more letters than a-zA-z |
No worry here we are dealing with different thing as mentioned in issue title.
|
How so? Can you give me an example? |
@rushatgabhane I did not explored Form.js component fully yet. So my understanding related to Form.js component is limited. So have no suggestion for that. |
oh okayy no problem :) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - Personal Details- Able to save Fist and Last name fields with One space What is the root cause of that problem?We don't have the logic to trim the value in the Form component What changes do you think we should make in order to solve the problem?In the Form Component, We should trim all values before validating the value like Line 173 in 2398744
add this logic to trim values
And using the trimmedValued instead of values in validate function My solution also fixes the same problem in all other places using Form Component like the Company Address Field in CompanyStep Page If we come up with this approach, we also remove the trim function in some places to clean What alternative solutions did you explore? (Optional)NA ResultScreen.Recording.2023-03-31.at.15.27.21.mov |
@Pujan92 @alexxxwork I tested your proposals and they don't see to work @tienifr your proposal makes sense to me and seems to work, it also fixes this issue in other components where we use the form, assigned! |
📣 @tienifr You have been assigned to this job by @jasperhuangg! |
@tienifr ping me here once you raise a PR, thanks! |
@jasperhuangg Regex testing don't work? |
@alexxxwork could you please explain why it's a workaround? |
@rushatgabhane The PR is created. Please help to review it, thanks |
Regression Test ProposalBug: Profile - Personal Details- Able to save Fist and Last name fields with One space Proposed Test Steps:
Do we 👍 or 👎 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.97-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-04-17. 🎊 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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
Just a polish to the Form component where we trim all string values. I don't think we need to do the Bug checklist here |
@rushatgabhane @tienifr apply please: https://www.upwork.com/jobs/~01c107dbee7d205160 Thanks! |
@NicMendonca applied, thanks! |
@rushatgabhane @tienifr - paid 🎉 |
@rushatgabhane @tienifr I don't know what happened there 😅 now both are paid! Sorry! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Unable to save Fist and Last name fields with One space
Actual Result:
The form is saved without issue.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.90.6
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
Bug5995857_space.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: