-
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 payment 2023-10-10] [$500] Profile - User is able to save display name with semicolon despite the error #28147
Comments
Triggered auto assignment to @miljakljajic ( |
Bug0 Triage Checklist (Main S/O)
|
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Auto-assign attempt failed, all eligible assignees are OOO. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Forms can be saved even if they have validation errors, for instance a user can save their display name with semicolons despite the form errors. What is the root cause of that problem?The FormProvider App/src/components/Form/FormProvider.js Lines 107 to 113 in 38030f8
App/src/components/Form/FormProvider.js Lines 134 to 137 in 38030f8
What changes do you think we should make in order to solve the problem?Return the const onValidate = useCallback(
(values) => {
const validateErrors = validate(values);
setErrors(validateErrors);
+ return validateErrors;
},
[validate],
); What alternative solutions did you explore? (Optional)None. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - User is able to save display name with semicolon despite the error What is the root cause of that problem?#27025 caused the regression. App/src/components/Form/FormProvider.js Lines 107 to 113 in f20eba2
We are not returning validate errors in What changes do you think we should make in order to solve the problem?We should return validate errors like this: const onValidate = useCallback(
(values) => {
const validateErrors = validate(values);
setErrors(validateErrors);
return validateErrors;
},
[validate],
); Also, we need to fix some issues in App/src/components/Form/FormProvider.js Line 101 in f20eba2
App/src/components/Form/FormProvider.js Lines 237 to 241 in f20eba2
We should pass these props to <FormWrapper
{...rest}
onSubmit={submit}
inputRefs={inputRefs}
errors={errors}
enabledWhenOffline={enabledWhenOffline}
formState={formState}
> What alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~013e634bc1893121ad |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
@eVoloshchak @parasharrajat I think we can address this issue as a single problem - #28148 |
Yes, this is a regression from #27025. cc: @thesahindia @kowczarz |
@kowczarz can you work on this since it seems like the migration PR is causing it? |
I don't think this is a blocker though |
Hey @luacmartins ! Actually after giving it a thought I believe that ankinwele's proposal would be correct for this case. The cause is valid, and this is something I would do also do. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
@staszekscp As this is a regression and author is OOO, may be you can create the PR for it. Thus we can also reassign the original C+ from root cause PR. if we want to solve it as fresh issue/follow-up then its fine. |
@parasharrajat, sure I can create the PR for this task, I'll let you know when it's ready with all the video recordings |
@staszekscp It seems that the main reason for these issues is missing a few pieces of required logic. Like in #28148, the prop was not passed. So I think there might be more such issues, can you please recheck the refactor code to be sure? Thanks. |
I will have a look at it today. I think I'm going to open another PR in case of any follow-ups. I think it would be a bit clearer that way. Do you agree? |
Anything works. |
Hey @parasharrajat! The PR is ready to be reviewed! |
Hmm, @parasharrajat I believe my solution is correct in more detail. We should fix this issue at once. Both #28148 and this issue are coming from FormProvider, right? We should pass |
@parasharrajat I have found some very minor things that I would like to discuss with @kowczarz, when he's back (on Monday, if nothing happens). In the meantime if you notice that there is some kind of regression related to the |
Sure, I will do that. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.76-6 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-10-10. 🎊 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.
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:
|
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:
|
This is a regression so no payments here. |
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 PR #27025
Action Performed:
Expected Result:
User should not be able to save the changes because of the error 'Name cannot contain a comma or semicolon
Actual Result:
User is able to save the changes despite the error 'Name cannot contain a comma or semicolon
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.74-1
Reproducible in staging?: Yes
Reproducible in production?: No
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
Bug6213663_Screen_Recording_20230925_212545_New_Expensify.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: