Closed lanitochka17 closed 11 months ago
Job added to Upwork: https://www.upwork.com/jobs/~015ab3357e3b21f462
Triggered auto assignment to @kevinksullivan (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External
)
The input field for the business name can be of any length and is beyond reasonable.
(over 1600 characters in the example which is beyond what a legal business name could be)
InputWrapper in CompanyStep has no input character limit (https://github.com/Expensify/App/blob/d985a0ee2604686911f34c99f5298af059622244/src/pages/ReimbursementAccount/CompanyStep.js#L165)
Set a reasonable maximum limit with the InputWrapper in CompanyStep. This value should go in CONST.ts with the explanation on the limit (ie. 40)
<InputWrapper
InputComponent={TextInput}
label={translate('companyStep.legalBusinessName')}
accessibilityLabel={translate('companyStep.legalBusinessName')}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
inputID="companyName"
containerStyles={[styles.mt4]}
disabled={shouldDisableCompanyName}
maxLength={CONST.MAX_BUSINESS_NAME_LENGTH}
defaultValue={getDefaultStateForField('companyName')}
shouldSaveDraft
shouldUseDefaultValue={shouldDisableCompanyName}
/>
Please find attached patch as a solution for the problem. CompanyStep.js component on lines 165-176 should have maxLength
prop with the value coming from CONST.ts
and named CONST.LEGAL_NAMES_CHARACTER_LIMIT
.
diff --git a/src/pages/ReimbursementAccount/CompanyStep.js b/src/pages/ReimbursementAccount/CompanyStep.js
index e31988fbb1..79a6467003 100644
--- a/src/pages/ReimbursementAccount/CompanyStep.js
+++ b/src/pages/ReimbursementAccount/CompanyStep.js
@@ -165,6 +165,7 @@ function CompanyStep({reimbursementAccount, reimbursementAccountDraft, getDefaul
<InputWrapper
InputComponent={TextInput}
label={translate('companyStep.legalBusinessName')}
+ maxLength={CONST.LEGAL_NAMES_CHARACTER_LIMIT}
accessibilityLabel={translate('companyStep.legalBusinessName')}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
inputID="companyName"
📣 @lukaspawlik! 📣 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. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: lukasz.pawlik@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01d0a5c201a9ae3e6a
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
I went thought the code and found issue in validate function, there is not max length condition and also max-length props is not there.
<InputWrapper InputComponent={TextInput} label={translate('companyStep.legalBusinessName')} accessibilityLabel={translate('companyStep.legalBusinessName')} role={CONST.ACCESSIBILITY_ROLE.TEXT} inputID="companyName" containerStyles={[styles.mt4]} disabled={shouldDisableCompanyName} defaultValue={getDefaultStateForField('companyName')} shouldSaveDraft shouldUseDefaultValue={shouldDisableCompanyName} />
This should be handled in here
Contributor details Your Expensify account email: ashishdevswami@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~011ad3126c906e7452
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
I observed the code implemented here and found maxLength property is missing for the InputWrapper component object on line 165. Implementing this will solve the issue and this is as per the standard of code.
https://github.com/Expensify/App/assets/2726330/e9bbf3fa-ad6b-4239-a8b6-000c2113c858
@mananjadhav, @kevinksullivan Huh... This is 4 days overdue. Who can take care of this?
@mananjadhav, @kevinksullivan 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@mananjadhav, @kevinksullivan 10 days overdue. Is anyone even seeing these? Hello?
Hi @mananjadhav , are you going to review these proposals? If not in the next day or two I'll have to reassign.
I think we should close this and handle it here
Got it, I am going to close then.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.3-6 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:
Expected Result:
There is a character limit for legal business names
Actual Result:
No character limit
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/b4f68c6b-24db-49eb-80d1-53a23d45469b
View all open jobs on GitHub
Upwork Automation - Do Not Edit