-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 regression test] [$4000] Bug: Entering 0 as a name causes problems #13779
Comments
Triggered auto assignment to @lschurr ( |
Invalid workspace name
error shows while editing workspace name to 0
I'm going to make this weekly while it's on hold. |
Believe this is still on hold. |
Invalid workspace name
error shows while editing workspace name to 0Invalid workspace name
error shows while editing workspace name to 0
WAQ is under control for now so I'm taking this off hold. I think we can make this external because we can show an error from the frontend if "0" is entered as a name. Alternatively we could allow "0" as a valid name and fix it on the backend, but I doubt that we want to do that. I'll ask for some more opinions since I'm not sure. |
Posted in Slack here. |
Invalid workspace name
error shows while editing workspace name to 0
In Slack we decided that "0" should not be a valid name and that it should be validated on the front end and the backend. I can take care of the backend and I'll mark the issue external so that a contributor can take care of the front end. |
Job added to Upwork: https://www.upwork.com/jobs/~01bc5fba9186abc46a |
Triggered auto assignment to @bfitzexpensify ( |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.72-1 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-02-23. 🎊 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:
|
Making this daily so we can work on the checklist. |
Holding for a few more days for payment. |
@puneetlath Do you agree we don't have a PR introducing this issue? We improved the |
Yes, I agree. This is more of an improvement than a bug fix I'd say. |
@gadhiyamanan can you please apply to this upwork job for the reporting bonus: https://www.upwork.com/jobs/~01bc5fba9186abc46a |
@puneetlath applied |
@puneetlath please close the upwork contract |
Hi @mollfpr - be sure to take a look at the checklist and work through those steps. Specifically, could you confirm when you've proposed a regression test? |
Thanks @puneetlath! I’ll work on the checklist and the regression test. |
Proposed regression test: RequestCallPage
LegalNamePage
DisplayNamePage
|
Thanks @mollfpr - I'll create a GH for this regression test today and will close this out. |
Alright, all set. Closing this one out! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Problem
Entering 0 as a name can cause strange errors because on the backend we check if the name is empty and "0" is considered empty in PHP. There are a few different manifestations of this problem listed below. Whoever is assigned to work on this issue should first try to find all occurrences of this problem in the app so we can fix them all at once.
Solution
Use front end validation to prevent a user from entering "0" as a name anywhere in the app. To do so, create a validation helper in the ValidationUtils that will return false if "0" is provided for a name. Next use that validation helper where relevant and in accordance with our form guidelines.
On the backend make sure that "0" can not be saved as a valid name anywhere in the app.
Additionally, let's match the front and back end validation exactly so that the user has timely feedback when they enter an invalid name.
Backend validation
Known bugs
1. Workspace name
Action Performed:
Expected Result:
0 should be considered an invalid workspace name and an error should be shown before clicking save
Actual Result:
0 is considered a valid workspace name until after you click save, then an error is shown that it's an invalid name.
Notes/Photos/Videos:
Screen.Recording.2022-12-21.at.8.34.51.PM.mov
2. Profile name
Action Performed:
Expected Result:
0 should be considered an invalid profile name and an error should be shown before clicking save
Actual Result:
There is no error and on the profile page the display name appears as the user's email address
Notes/Photos/Videos:
Screen.Recording.2023-01-13.at.5.00.17.PM.mov
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
All
Version Number: 1.2.42-2
Reproducible in staging?: y
Reproducible in production?: y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1671635151324279
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: